<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>Code &mdash; ZDStack 0.11-RC1 Developer Documentation</title>
    <link rel="stylesheet" href="_static/default.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '',
        VERSION:     'RC1',
        COLLAPSE_MODINDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <link rel="top" title="ZDStack 0.11-RC1 Developer Documentation" href="index.html" />
    <link rel="prev" title="Welcome to ZDStack’s developer documentation!" href="index.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="modindex.html" title="Global Module Index"
             accesskey="M">modules</a> |</li>
        <li class="right" >
          <a href="index.html" title="Welcome to ZDStack’s developer documentation!"
             accesskey="P">previous</a> |</li>
        <li><a href="index.html">ZDStack 0.11-RC1 Developer Documentation</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="code">
<h1>Code<a class="headerlink" href="#code" title="Permalink to this headline">¶</a></h1>
<div class="section" id="module-ZDStack">
<h2>ZDStack<a class="headerlink" href="#module-ZDStack" title="Permalink to this headline">¶</a></h2>
<dl class="exception">
<dt id="ZDStack.JSONNotFoundError">
<em class="property">exception </em><tt class="descclassname">ZDStack.</tt><tt class="descname">JSONNotFoundError</tt><a class="headerlink" href="#ZDStack.JSONNotFoundError" title="Permalink to this definition">¶</a></dt>
<dd><dl class="attribute">
<dt id="ZDStack.JSONNotFoundError.args">
<tt class="descname">args</tt><a class="headerlink" href="#ZDStack.JSONNotFoundError.args" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.JSONNotFoundError.message">
<tt class="descname">message</tt><a class="headerlink" href="#ZDStack.JSONNotFoundError.message" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="exception">
<dt id="ZDStack.PlayerNotFoundError">
<em class="property">exception </em><tt class="descclassname">ZDStack.</tt><tt class="descname">PlayerNotFoundError</tt><big>(</big><em>name=None</em>, <em>ip_address_and_port=None</em><big>)</big><a class="headerlink" href="#ZDStack.PlayerNotFoundError" title="Permalink to this definition">¶</a></dt>
<dd><dl class="attribute">
<dt id="ZDStack.PlayerNotFoundError.args">
<tt class="descname">args</tt><a class="headerlink" href="#ZDStack.PlayerNotFoundError.args" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.PlayerNotFoundError.message">
<tt class="descname">message</tt><a class="headerlink" href="#ZDStack.PlayerNotFoundError.message" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="exception">
<dt id="ZDStack.TeamNotFoundError">
<em class="property">exception </em><tt class="descclassname">ZDStack.</tt><tt class="descname">TeamNotFoundError</tt><big>(</big><em>color</em><big>)</big><a class="headerlink" href="#ZDStack.TeamNotFoundError" title="Permalink to this definition">¶</a></dt>
<dd><dl class="attribute">
<dt id="ZDStack.TeamNotFoundError.args">
<tt class="descname">args</tt><a class="headerlink" href="#ZDStack.TeamNotFoundError.args" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.TeamNotFoundError.message">
<tt class="descname">message</tt><a class="headerlink" href="#ZDStack.TeamNotFoundError.message" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="exception">
<dt id="ZDStack.ZServNotFoundError">
<em class="property">exception </em><tt class="descclassname">ZDStack.</tt><tt class="descname">ZServNotFoundError</tt><big>(</big><em>zserv_name</em><big>)</big><a class="headerlink" href="#ZDStack.ZServNotFoundError" title="Permalink to this definition">¶</a></dt>
<dd><dl class="attribute">
<dt id="ZDStack.ZServNotFoundError.args">
<tt class="descname">args</tt><a class="headerlink" href="#ZDStack.ZServNotFoundError.args" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZServNotFoundError.message">
<tt class="descname">message</tt><a class="headerlink" href="#ZDStack.ZServNotFoundError.message" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="exception">
<dt id="ZDStack.RPCAuthenticationError">
<em class="property">exception </em><tt class="descclassname">ZDStack.</tt><tt class="descname">RPCAuthenticationError</tt><big>(</big><em>username</em><big>)</big><a class="headerlink" href="#ZDStack.RPCAuthenticationError" title="Permalink to this definition">¶</a></dt>
<dd><dl class="attribute">
<dt id="ZDStack.RPCAuthenticationError.args">
<tt class="descname">args</tt><a class="headerlink" href="#ZDStack.RPCAuthenticationError.args" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.RPCAuthenticationError.message">
<tt class="descname">message</tt><a class="headerlink" href="#ZDStack.RPCAuthenticationError.message" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="function">
<dt id="ZDStack.get_hostname">
<tt class="descclassname">ZDStack.</tt><tt class="descname">get_hostname</tt><big>(</big><big>)</big><a class="headerlink" href="#ZDStack.get_hostname" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets this machine&#8217;s public-facing hostname.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">string</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body">the machine&#8217;s public-facing hostname.</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="ZDStack.get_loopback">
<tt class="descclassname">ZDStack.</tt><tt class="descname">get_loopback</tt><big>(</big><big>)</big><a class="headerlink" href="#ZDStack.get_loopback" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets this machine&#8217;s private loopback address.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">string</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body">the machine&#8217;s private loopback address</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="ZDStack.get_engine">
<tt class="descclassname">ZDStack.</tt><tt class="descname">get_engine</tt><big>(</big><big>)</big><a class="headerlink" href="#ZDStack.get_engine" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets the database engine.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">an SQLAlchemy Engine instance.</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="ZDStack.get_metadata">
<tt class="descclassname">ZDStack.</tt><tt class="descname">get_metadata</tt><big>(</big><big>)</big><a class="headerlink" href="#ZDStack.get_metadata" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets the database&#8217;s metadata.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">an SQLAlchemy MetaData instance.</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="ZDStack.get_db_lock">
<tt class="descclassname">ZDStack.</tt><tt class="descname">get_db_lock</tt><big>(</big><big>)</big><a class="headerlink" href="#ZDStack.get_db_lock" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets the global DB lock.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><tt class="xref docutils literal"><span class="pre">Lock</span></tt></td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body">the global database lock, although doesn&#8217;t acquire it</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="ZDStack.get_session_class">
<tt class="descclassname">ZDStack.</tt><tt class="descname">get_session_class</tt><big>(</big><big>)</big><a class="headerlink" href="#ZDStack.get_session_class" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets the database Session class.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">an SQLAlchemy Session class.</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="ZDStack.get_configfile">
<tt class="descclassname">ZDStack.</tt><tt class="descname">get_configfile</tt><big>(</big><big>)</big><a class="headerlink" href="#ZDStack.get_configfile" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets the location of the ZDStack configuration file.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">string</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body">the full resolved path to the ZDStack configuration file</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="ZDStack.set_configfile">
<tt class="descclassname">ZDStack.</tt><tt class="descname">set_configfile</tt><big>(</big><em>config_file</em><big>)</big><a class="headerlink" href="#ZDStack.set_configfile" title="Permalink to this definition">¶</a></dt>
<dd><p>Sets the location of the ZDStack configuration file.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>config_file</em> (string) &#8211; the new configuration file</td>
</tr>
</tbody>
</table>
<p>&#8216;config_file&#8217; will be run through &#8216;resolve_file()&#8217;</p>
</dd></dl>

<dl class="function">
<dt id="ZDStack.load_configparser">
<tt class="descclassname">ZDStack.</tt><tt class="descname">load_configparser</tt><big>(</big><big>)</big><a class="headerlink" href="#ZDStack.load_configparser" title="Permalink to this definition">¶</a></dt>
<dd><p>Loads the ZDStack configuration file into a ConfigParser.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><a title="ZDStack.ZDSConfigParser.ZDSConfigParser" class="reference internal" href="#ZDStack.ZDSConfigParser.ZDSConfigParser"><tt class="xref docutils literal"><span class="pre">ZDSConfigParser</span></tt></a></td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="ZDStack.get_configparser">
<tt class="descclassname">ZDStack.</tt><tt class="descname">get_configparser</tt><big>(</big><em>reload=False</em>, <em>raw=False</em><big>)</big><a class="headerlink" href="#ZDStack.get_configparser" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets ZDStack&#8217;s ConfigParser.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><em>reload</em> (boolean) &#8211; whether or not to reload the configuration file</li>
<li><em>raw</em> (boolean) &#8211; disables value interpolation</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a title="ZDStack.ZDSConfigParser.ZDSConfigParser" class="reference internal" href="#ZDStack.ZDSConfigParser.ZDSConfigParser"><tt class="xref docutils literal"><span class="pre">ZDSConfigParser</span></tt></a> or
<a title="ZDStack.ZDSConfigParser.RawZDSConfigParser" class="reference internal" href="#ZDStack.ZDSConfigParser.RawZDSConfigParser"><tt class="xref docutils literal"><span class="pre">RawZDSConfigParser</span></tt></a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="ZDStack.get_zdaemon_banlist_data">
<tt class="descclassname">ZDStack.</tt><tt class="descname">get_zdaemon_banlist_data</tt><big>(</big><big>)</big><a class="headerlink" href="#ZDStack.get_zdaemon_banlist_data" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets the contents of the ZDaemon master banlist.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Returns:</th><td class="field-body">the contents of the ZDaemon master banlist.</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">string</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="ZDStack.get_zdaemon_banlist_file">
<tt class="descclassname">ZDStack.</tt><tt class="descname">get_zdaemon_banlist_file</tt><big>(</big><big>)</big><a class="headerlink" href="#ZDStack.get_zdaemon_banlist_file" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets the full resolved path to the ZDaemon banlist file.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Returns:</th><td class="field-body">the full resolved path to the ZDaemon master banlist
file, properly parsed into ZDStack&#8217;s banlist format</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">string</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="ZDStack.get_server_proxy">
<tt class="descclassname">ZDStack.</tt><tt class="descname">get_server_proxy</tt><big>(</big><big>)</big><a class="headerlink" href="#ZDStack.get_server_proxy" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets a ZDStack server proxy.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">an instance of either <a title="ZDStack.RPCServer.XMLProxy" class="reference internal" href="#ZDStack.RPCServer.XMLProxy"><tt class="xref docutils literal"><span class="pre">XMLProxy</span></tt></a>
or <a title="ZDStack.RPCServer.JSONProxy" class="reference internal" href="#ZDStack.RPCServer.JSONProxy"><tt class="xref docutils literal"><span class="pre">JSONProxy</span></tt></a></td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="ZDStack.get_plugins">
<tt class="descclassname">ZDStack.</tt><tt class="descname">get_plugins</tt><big>(</big><em>plugins='all'</em><big>)</big><a class="headerlink" href="#ZDStack.get_plugins" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets the installed plugins.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>plugins</em> (list of strings or string) &#8211; the names of the plugins to get, if &#8216;all&#8217;, returns
all plugins.</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">a list of modules</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="ZDStack.set_debugging">
<tt class="descclassname">ZDStack.</tt><tt class="descname">set_debugging</tt><big>(</big><em>debugging</em><big>)</big><a class="headerlink" href="#ZDStack.set_debugging" title="Permalink to this definition">¶</a></dt>
<dd><p>Turns debugging on or off.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>debugging</em> (boolean) &#8211; whether or not debugging is enabled</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="ZDStack.get_zdslog">
<tt class="descclassname">ZDStack.</tt><tt class="descname">get_zdslog</tt><big>(</big><em>reload=False</em><big>)</big><a class="headerlink" href="#ZDStack.get_zdslog" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets the ZDStack logger.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>reload</em> (boolean) &#8211; whether or not to reload the logger</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">Logger</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="ZDStack.get_debugging">
<tt class="descclassname">ZDStack.</tt><tt class="descname">get_debugging</tt><big>(</big><big>)</big><a class="headerlink" href="#ZDStack.get_debugging" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets whether debugging is set or not.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">boolean.</td>
</tr>
</tbody>
</table>
</dd></dl>

</div>
<div class="section" id="module-ZDStack.LogEvent">
<h2>ZDStack.LogEvent<a class="headerlink" href="#module-ZDStack.LogEvent" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="ZDStack.LogEvent.LogEvent">
<em class="property">class </em><tt class="descclassname">ZDStack.LogEvent.</tt><tt class="descname">LogEvent</tt><big>(</big><em>event_dt</em>, <em>event_type</em>, <em>event_data</em>, <em>event_category</em>, <em>line=''</em><big>)</big><a class="headerlink" href="#ZDStack.LogEvent.LogEvent" title="Permalink to this definition">¶</a></dt>
<dd><p>LogEvent represents an event occurring in a log file.</p>
<dl class="attribute">
<dt id="ZDStack.LogEvent.LogEvent.dt">
<tt class="descname">dt</tt><a class="headerlink" href="#ZDStack.LogEvent.LogEvent.dt" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A datetime representing the time at which the event occurred.</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.LogEvent.LogEvent.type">
<tt class="descname">type</tt><a class="headerlink" href="#ZDStack.LogEvent.LogEvent.type" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A string representing the type of the event.</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.LogEvent.LogEvent.data">
<tt class="descname">data</tt><a class="headerlink" href="#ZDStack.LogEvent.LogEvent.data" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A dict containing event-specific data.</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.LogEvent.LogEvent.category">
<tt class="descname">category</tt><a class="headerlink" href="#ZDStack.LogEvent.LogEvent.category" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A string representing the category of the event.</tt></dt>
<dd></dd></dl>

</dd></dl>

</div>
<div class="section" id="module-ZDStack.Plugins">
<h2>ZDStack.Plugins<a class="headerlink" href="#module-ZDStack.Plugins" title="Permalink to this headline">¶</a></h2>
<dl class="function">
<dt id="ZDStack.Plugins.extract_module_callables">
<tt class="descclassname">ZDStack.Plugins.</tt><tt class="descname">extract_module_callables</tt><big>(</big><em>module</em><big>)</big><a class="headerlink" href="#ZDStack.Plugins.extract_module_callables" title="Permalink to this definition">¶</a></dt>
<dd><p>Extract the functions from a plugin module.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>module</em> &#8211; a plugin module.  get_modules returns a list of
these.</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">a list of function objects</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="ZDStack.Plugins.get_modules">
<tt class="descclassname">ZDStack.Plugins.</tt><tt class="descname">get_modules</tt><big>(</big><em>plugin_path</em><big>)</big><a class="headerlink" href="#ZDStack.Plugins.get_modules" title="Permalink to this definition">¶</a></dt>
<dd><p>Get compiled plugin modules.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>plugin_path</em> &#8211; a string representing the full path to the
plugin folder</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">list of compiled plugin module objects</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="ZDStack.Plugins.get_plugins">
<tt class="descclassname">ZDStack.Plugins.</tt><tt class="descname">get_plugins</tt><big>(</big><em>plugin_path</em><big>)</big><a class="headerlink" href="#ZDStack.Plugins.get_plugins" title="Permalink to this definition">¶</a></dt>
<dd><p>Get all plugin functions.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>plugin_path</em> &#8211; a string representing the full path to the
plugin folder.</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">a list of functions</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="ZDStack.Plugins.is_plugin">
<tt class="descclassname">ZDStack.Plugins.</tt><tt class="descname">is_plugin</tt><big>(</big><em>p</em><big>)</big><a class="headerlink" href="#ZDStack.Plugins.is_plugin" title="Permalink to this definition">¶</a></dt>
<dd><p>Test if something is a plugin.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>p</em> &#8211; a string representing the filename of a potential plugin
file</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">Boolean</td>
</tr>
</tbody>
</table>
</dd></dl>

</div>
<div class="section" id="module-ZDStack.RPCServer">
<h2>ZDStack.RPCServer<a class="headerlink" href="#module-ZDStack.RPCServer" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="ZDStack.RPCServer.AuthenticatedRPCDispatcher">
<em class="property">class </em><tt class="descclassname">ZDStack.RPCServer.</tt><tt class="descname">AuthenticatedRPCDispatcher</tt><big>(</big><em>encoding</em>, <em>username</em>, <em>password</em><big>)</big><a class="headerlink" href="#ZDStack.RPCServer.AuthenticatedRPCDispatcher" title="Permalink to this definition">¶</a></dt>
<dd><p>Adds authentication to RPC dispatching.</p>
<dl class="attribute">
<dt id="ZDStack.RPCServer.AuthenticatedRPCDispatcher.encoding">
<tt class="descname">encoding</tt><a class="headerlink" href="#ZDStack.RPCServer.AuthenticatedRPCDispatcher.encoding" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A string representing the encoding of the RPC data.</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.RPCServer.AuthenticatedRPCDispatcher.username">
<tt class="descname">username</tt><a class="headerlink" href="#ZDStack.RPCServer.AuthenticatedRPCDispatcher.username" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A string representing the authenticating username</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.RPCServer.AuthenticatedRPCDispatcher.password">
<tt class="descname">password</tt><a class="headerlink" href="#ZDStack.RPCServer.AuthenticatedRPCDispatcher.password" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A string representing the authenticating password</tt></dt>
<dd></dd></dl>

<dl class="method">
<dt id="ZDStack.RPCServer.AuthenticatedRPCDispatcher.register_function">
<tt class="descname">register_function</tt><big>(</big><em>function</em>, <em>name=None</em>, <em>requires_authentication=False</em><big>)</big><a class="headerlink" href="#ZDStack.RPCServer.AuthenticatedRPCDispatcher.register_function" title="Permalink to this definition">¶</a></dt>
<dd><p>Registers a function to respond to RPC requests.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><em>function</em> (function) &#8211; the function to register</li>
<li><em>name</em> (string) &#8211; the name to register the function under; uses the
function&#8217;s current name by default.</li>
<li><em>requires_authentication</em> (boolean) &#8211; whether or not the function
requires authentication.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="ZDStack.RPCServer.BaseProxy">
<em class="property">class </em><tt class="descclassname">ZDStack.RPCServer.</tt><tt class="descname">BaseProxy</tt><big>(</big><em>uri</em>, <em>transport</em>, <em>encoding=None</em>, <em>verbose=0</em>, <em>use_datetime=0</em><big>)</big><a class="headerlink" href="#ZDStack.RPCServer.BaseProxy" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="class">
<dt id="ZDStack.RPCServer.BaseRPCRequestHandler">
<em class="property">class </em><tt class="descclassname">ZDStack.RPCServer.</tt><tt class="descname">BaseRPCRequestHandler</tt><big>(</big><em>request</em>, <em>client_address</em>, <em>server</em><big>)</big><a class="headerlink" href="#ZDStack.RPCServer.BaseRPCRequestHandler" title="Permalink to this definition">¶</a></dt>
<dd><p>BaseRPCRequestHandler allows a configurable transport MIME-Type.</p>
<dl class="method">
<dt id="ZDStack.RPCServer.BaseRPCRequestHandler.do_POST">
<tt class="descname">do_POST</tt><big>(</big><big>)</big><a class="headerlink" href="#ZDStack.RPCServer.BaseRPCRequestHandler.do_POST" title="Permalink to this definition">¶</a></dt>
<dd><p>Handles the HTTP POST request.</p>
<p>Attempts to interpret all HTTP POST requests as RPC calls,
which are forwarded to the server&#8217;s _dispatch method for
handling.</p>
</dd></dl>

<dl class="method">
<dt id="ZDStack.RPCServer.BaseRPCRequestHandler.log_message">
<tt class="descname">log_message</tt><big>(</big><em>format</em>, <em>*args</em><big>)</big><a class="headerlink" href="#ZDStack.RPCServer.BaseRPCRequestHandler.log_message" title="Permalink to this definition">¶</a></dt>
<dd><p>Logs a message</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><em>format</em> (string) &#8211; a format string</li>
<li><em>args</em> (list) &#8211; the arguments to interpolate into the format
string</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="ZDStack.RPCServer.JSONProxy">
<em class="property">class </em><tt class="descclassname">ZDStack.RPCServer.</tt><tt class="descname">JSONProxy</tt><big>(</big><em>uri</em>, <em>transport=None</em>, <em>encoding=None</em>, <em>verbose=0</em>, <em>use_datetime=0</em><big>)</big><a class="headerlink" href="#ZDStack.RPCServer.JSONProxy" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="class">
<dt id="ZDStack.RPCServer.JSONRPCRequestHandler">
<em class="property">class </em><tt class="descclassname">ZDStack.RPCServer.</tt><tt class="descname">JSONRPCRequestHandler</tt><big>(</big><em>request</em>, <em>client_address</em>, <em>server</em><big>)</big><a class="headerlink" href="#ZDStack.RPCServer.JSONRPCRequestHandler" title="Permalink to this definition">¶</a></dt>
<dd>JSONRPCRequestHandler handles JSON-RPC requests.</dd></dl>

<dl class="class">
<dt id="ZDStack.RPCServer.JSONRPCServer">
<em class="property">class </em><tt class="descclassname">ZDStack.RPCServer.</tt><tt class="descname">JSONRPCServer</tt><big>(</big><em>addr</em>, <em>username</em>, <em>password</em>, <em>requestHandler=&lt;class ZDStack.RPCServer.JSONRPCRequestHandler at 0x902ab0c&gt;</em>, <em>logRequests=True</em>, <em>encoding=None</em><big>)</big><a class="headerlink" href="#ZDStack.RPCServer.JSONRPCServer" title="Permalink to this definition">¶</a></dt>
<dd><dl class="method">
<dt id="ZDStack.RPCServer.JSONRPCServer.datetime_to_seconds">
<tt class="descname">datetime_to_seconds</tt><big>(</big><em>dt</em><big>)</big><a class="headerlink" href="#ZDStack.RPCServer.JSONRPCServer.datetime_to_seconds" title="Permalink to this definition">¶</a></dt>
<dd><p>Converts a datetime instance into seconds since the epoch.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>dt</em> (datetime) &#8211; the datetime instance</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.RPCServer.JSONRPCServer.exception_to_dict">
<tt class="descname">exception_to_dict</tt><big>(</big><em>e</em>, <em>code</em>, <em>context</em><big>)</big><a class="headerlink" href="#ZDStack.RPCServer.JSONRPCServer.exception_to_dict" title="Permalink to this definition">¶</a></dt>
<dd><p>Converts an exception into a serializable dict.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><em>e</em> (exception) &#8211; an exception to convert</li>
<li><em>code</em> (string) &#8211; the 3-digit error code</li>
<li><em>context</em> (string) &#8211; a message to go along with the exception</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.RPCServer.JSONRPCServer.generate_response">
<tt class="descname">generate_response</tt><big>(</big><em>result=None</em>, <em>error=None</em>, <em>id=None</em><big>)</big><a class="headerlink" href="#ZDStack.RPCServer.JSONRPCServer.generate_response" title="Permalink to this definition">¶</a></dt>
<dd><p>Generates a JSON response.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><em>result</em> &#8211; the output of the RPC method call</li>
<li><em>error</em> (dict) &#8211; error information</li>
<li><em>id</em> (integer) &#8211; the id number of the request</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.RPCServer.JSONRPCServer.register_introspection_functions">
<tt class="descname">register_introspection_functions</tt><big>(</big><big>)</big><a class="headerlink" href="#ZDStack.RPCServer.JSONRPCServer.register_introspection_functions" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="ZDStack.RPCServer.JSONRPCServer.set_address">
<tt class="descname">set_address</tt><big>(</big><em>address</em><big>)</big><a class="headerlink" href="#ZDStack.RPCServer.JSONRPCServer.set_address" title="Permalink to this definition">¶</a></dt>
<dd><p>Sets this server&#8217;s address.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>address</em> (string) &#8211; the address to set</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.RPCServer.JSONRPCServer.set_help_url">
<tt class="descname">set_help_url</tt><big>(</big><em>help_url</em><big>)</big><a class="headerlink" href="#ZDStack.RPCServer.JSONRPCServer.set_help_url" title="Permalink to this definition">¶</a></dt>
<dd><p>Sets this server&#8217;s help URL.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>help_url</em> (string) &#8211; the help URL</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.RPCServer.JSONRPCServer.set_summary">
<tt class="descname">set_summary</tt><big>(</big><em>summary</em><big>)</big><a class="headerlink" href="#ZDStack.RPCServer.JSONRPCServer.set_summary" title="Permalink to this definition">¶</a></dt>
<dd><p>Sets this server&#8217;s summary.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>summary</em> (string) &#8211; the summary to set</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.RPCServer.JSONRPCServer.system_describe">
<tt class="descname">system_describe</tt><big>(</big><big>)</big><a class="headerlink" href="#ZDStack.RPCServer.JSONRPCServer.system_describe" title="Permalink to this definition">¶</a></dt>
<dd>system.describe() =&gt; {&#8216;sdversion&#8217;: &#8216;1.0&#8217;, &#8216;name&#8217;: ...}</dd></dl>

</dd></dl>

<dl class="class">
<dt id="ZDStack.RPCServer.JSONTransport">
<em class="property">class </em><tt class="descclassname">ZDStack.RPCServer.</tt><tt class="descname">JSONTransport</tt><big>(</big><em>use_datetime=0</em><big>)</big><a class="headerlink" href="#ZDStack.RPCServer.JSONTransport" title="Permalink to this definition">¶</a></dt>
<dd><dl class="method">
<dt id="ZDStack.RPCServer.JSONTransport.send_content">
<tt class="descname">send_content</tt><big>(</big><em>connection</em>, <em>request_body</em><big>)</big><a class="headerlink" href="#ZDStack.RPCServer.JSONTransport.send_content" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="ZDStack.RPCServer.SafeJSONTransport">
<em class="property">class </em><tt class="descclassname">ZDStack.RPCServer.</tt><tt class="descname">SafeJSONTransport</tt><big>(</big><em>use_datetime=0</em><big>)</big><a class="headerlink" href="#ZDStack.RPCServer.SafeJSONTransport" title="Permalink to this definition">¶</a></dt>
<dd><p>Handles an HTTPS transaction to an XML-RPC server.</p>
<dl class="method">
<dt id="ZDStack.RPCServer.SafeJSONTransport.make_connection">
<tt class="descname">make_connection</tt><big>(</big><em>host</em><big>)</big><a class="headerlink" href="#ZDStack.RPCServer.SafeJSONTransport.make_connection" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="ZDStack.RPCServer.XMLProxy">
<em class="property">class </em><tt class="descclassname">ZDStack.RPCServer.</tt><tt class="descname">XMLProxy</tt><big>(</big><em>uri</em>, <em>transport=None</em>, <em>encoding=None</em>, <em>verbose=0</em>, <em>use_datetime=0</em><big>)</big><a class="headerlink" href="#ZDStack.RPCServer.XMLProxy" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="class">
<dt id="ZDStack.RPCServer.XMLRPCRequestHandler">
<em class="property">class </em><tt class="descclassname">ZDStack.RPCServer.</tt><tt class="descname">XMLRPCRequestHandler</tt><big>(</big><em>request</em>, <em>client_address</em>, <em>server</em><big>)</big><a class="headerlink" href="#ZDStack.RPCServer.XMLRPCRequestHandler" title="Permalink to this definition">¶</a></dt>
<dd>XMLRPCRequestHandler handles XML-RPC requests.</dd></dl>

<dl class="class">
<dt id="ZDStack.RPCServer.XMLRPCServer">
<em class="property">class </em><tt class="descclassname">ZDStack.RPCServer.</tt><tt class="descname">XMLRPCServer</tt><big>(</big><em>addr</em>, <em>username</em>, <em>password</em>, <em>requestHandler=&lt;class ZDStack.RPCServer.XMLRPCRequestHandler at 0x902abcc&gt;</em>, <em>logRequests=True</em>, <em>encoding=None</em><big>)</big><a class="headerlink" href="#ZDStack.RPCServer.XMLRPCServer" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</div>
<div class="section" id="module-ZDStack.Server">
<h2>ZDStack.Server<a class="headerlink" href="#module-ZDStack.Server" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="ZDStack.Server.Server">
<em class="property">class </em><tt class="descclassname">ZDStack.Server.</tt><tt class="descname">Server</tt><a class="headerlink" href="#ZDStack.Server.Server" title="Permalink to this definition">¶</a></dt>
<dd><p>Server represents a daemonized process serving network requests.</p>
<dl class="attribute">
<dt id="ZDStack.Server.Server.stats">
<tt class="descname">stats</tt><a class="headerlink" href="#ZDStack.Server.Server.stats" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A dict of server stats.</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.Server.Server.status">
<tt class="descname">status</tt><a class="headerlink" href="#ZDStack.Server.Server.status" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A string representing the server's status.</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.Server.Server.hostname">
<tt class="descname">hostname</tt><a class="headerlink" href="#ZDStack.Server.Server.hostname" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A string representing the server's hostname.</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.Server.Server.port">
<tt class="descname">port</tt><a class="headerlink" href="#ZDStack.Server.Server.port" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">An int representing the server's port.</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.Server.Server.logfile">
<tt class="descname">logfile</tt><a class="headerlink" href="#ZDStack.Server.Server.logfile" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A string representing the server's logfile</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.Server.Server.pidfile">
<tt class="descname">pidfile</tt><a class="headerlink" href="#ZDStack.Server.Server.pidfile" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A string representing the server's PID file</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.Server.Server.username">
<tt class="descname">username</tt><a class="headerlink" href="#ZDStack.Server.Server.username" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A string representing the authenticating username</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.Server.Server.password">
<tt class="descname">password</tt><a class="headerlink" href="#ZDStack.Server.Server.password" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A string representing the authenticating password</tt></dt>
<dd></dd></dl>

<dl class="method">
<dt id="ZDStack.Server.Server.get_logfile">
<tt class="descname">get_logfile</tt><big>(</big><big>)</big><a class="headerlink" href="#ZDStack.Server.Server.get_logfile" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets the contents of this server&#8217;s logfile.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Returns:</th><td class="field-body">the contents of ZDStack&#8217;s logfile.</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">string</td>
</tr>
</tbody>
</table>
<p>This logfile can be really large if debugging is enabled, fair
warning.</p>
</dd></dl>

<dl class="method">
<dt id="ZDStack.Server.Server.get_status">
<tt class="descname">get_status</tt><big>(</big><big>)</big><a class="headerlink" href="#ZDStack.Server.Server.get_status" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets the current status of the server.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Returns:</th><td class="field-body">ZDStack&#8217;s current status as a server</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">string</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.Server.Server.handle_signal">
<tt class="descname">handle_signal</tt><big>(</big><em>signum</em>, <em>frame</em><big>)</big><a class="headerlink" href="#ZDStack.Server.Server.handle_signal" title="Permalink to this definition">¶</a></dt>
<dd>Handles a signal.</dd></dl>

<dl class="method">
<dt id="ZDStack.Server.Server.initialize_config">
<tt class="descname">initialize_config</tt><big>(</big><em>reload=False</em><big>)</big><a class="headerlink" href="#ZDStack.Server.Server.initialize_config" title="Permalink to this definition">¶</a></dt>
<dd><p>Initializes the server configuration:</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>reload</em> (boolean) &#8211; whether or not the config is being reloaded</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.Server.Server.load_config">
<tt class="descname">load_config</tt><big>(</big><em>config</em>, <em>reload=False</em><big>)</big><a class="headerlink" href="#ZDStack.Server.Server.load_config" title="Permalink to this definition">¶</a></dt>
<dd><p>Loads the config.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><em>config</em> (<a title="ZDStack.ZDSConfigParser.ZDSConfigParser" class="reference internal" href="#ZDStack.ZDSConfigParser.ZDSConfigParser"><tt class="xref docutils literal"><span class="pre">ZDSConfigParser</span></tt></a>) &#8211; the config to load</li>
<li><em>reload</em> (boolean) &#8211; whether or not the config is being reloaded</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.Server.Server.register_functions">
<tt class="descname">register_functions</tt><big>(</big><big>)</big><a class="headerlink" href="#ZDStack.Server.Server.register_functions" title="Permalink to this definition">¶</a></dt>
<dd>Registers public XML-RPC functions.</dd></dl>

<dl class="method">
<dt id="ZDStack.Server.Server.reload_config">
<tt class="descname">reload_config</tt><big>(</big><big>)</big><a class="headerlink" href="#ZDStack.Server.Server.reload_config" title="Permalink to this definition">¶</a></dt>
<dd>Reloads the configuration.</dd></dl>

<dl class="method">
<dt id="ZDStack.Server.Server.restart">
<tt class="descname">restart</tt><big>(</big><big>)</big><a class="headerlink" href="#ZDStack.Server.Server.restart" title="Permalink to this definition">¶</a></dt>
<dd>Restarts the server.</dd></dl>

<dl class="method">
<dt id="ZDStack.Server.Server.shutdown">
<tt class="descname">shutdown</tt><big>(</big><em>signum=15</em>, <em>retval=0</em><big>)</big><a class="headerlink" href="#ZDStack.Server.Server.shutdown" title="Permalink to this definition">¶</a></dt>
<dd><p>Shuts the server down.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><em>signum</em> &#8211; unused</li>
<li><em>retval</em> (integer) &#8211; the exit code to use if exit was successful</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.Server.Server.start">
<tt class="descname">start</tt><big>(</big><big>)</big><a class="headerlink" href="#ZDStack.Server.Server.start" title="Permalink to this definition">¶</a></dt>
<dd>Starts serving requests.</dd></dl>

<dl class="method">
<dt id="ZDStack.Server.Server.startup">
<tt class="descname">startup</tt><big>(</big><big>)</big><a class="headerlink" href="#ZDStack.Server.Server.startup" title="Permalink to this definition">¶</a></dt>
<dd>Starts the server up.</dd></dl>

<dl class="method">
<dt id="ZDStack.Server.Server.stop">
<tt class="descname">stop</tt><big>(</big><big>)</big><a class="headerlink" href="#ZDStack.Server.Server.stop" title="Permalink to this definition">¶</a></dt>
<dd>Stops serving requests.</dd></dl>

</dd></dl>

</div>
<div class="section" id="module-ZDStack.Stack">
<h2>ZDStack.Stack<a class="headerlink" href="#module-ZDStack.Stack" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="ZDStack.Stack.Stack">
<em class="property">class </em><tt class="descclassname">ZDStack.Stack.</tt><tt class="descname">Stack</tt><a class="headerlink" href="#ZDStack.Stack.Stack" title="Permalink to this definition">¶</a></dt>
<dd><p>Stack is the main ZDStack class.</p>
<dl class="attribute">
<dt id="ZDStack.Stack.Stack.spawn_lock">
<tt class="descname">spawn_lock</tt><a class="headerlink" href="#ZDStack.Stack.Stack.spawn_lock" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A Lock that must be acquired before a zserv can spawn.</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.Stack.Stack.szn_lock">
<tt class="descname">szn_lock</tt><a class="headerlink" href="#ZDStack.Stack.Stack.szn_lock" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A Lock that must be acquired before modifying</tt></dt>
<dt>
<tt class="descname">stopped_zserv_list.</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.Stack.Stack.zservs">
<tt class="descname">zservs</tt><a class="headerlink" href="#ZDStack.Stack.Stack.zservs" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A dict mapping ZServ names to ZServ instances.</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.Stack.Stack.stopped_zserv_names">
<tt class="descname">stopped_zserv_names</tt><a class="headerlink" href="#ZDStack.Stack.Stack.stopped_zserv_names" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A set of strings representing the names of stopped ZServ</tt></dt>
<dt>
<tt class="descname">instances.</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.Stack.Stack.start_time">
<tt class="descname">start_time</tt><a class="headerlink" href="#ZDStack.Stack.Stack.start_time" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A datetime representing the time the Stack started.</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.Stack.Stack.keep_checking_loglinks">
<tt class="descname">keep_checking_loglinks</tt><a class="headerlink" href="#ZDStack.Stack.Stack.keep_checking_loglinks" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A boolean that, when set to False, does not reset the</tt></dt>
<dt>
<tt class="descname">loglink_check_timer after checking log links.</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.Stack.Stack.keep_spawning_zservs">
<tt class="descname">keep_spawning_zservs</tt><a class="headerlink" href="#ZDStack.Stack.Stack.keep_spawning_zservs" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A boolean that, when set to False, does not reset the</tt></dt>
<dt>
<tt class="descname">zserv_check_timer after checking ZServs.</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.Stack.Stack.keep_polling">
<tt class="descname">keep_polling</tt><a class="headerlink" href="#ZDStack.Stack.Stack.keep_polling" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A boolean that, when set to False, stops the ZServ Polling</tt></dt>
<dt>
<tt class="descname">Thread.</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.Stack.Stack.keep_parsing">
<tt class="descname">keep_parsing</tt><a class="headerlink" href="#ZDStack.Stack.Stack.keep_parsing" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A boolean that, when set to False, stops the ZServ Parsing</tt></dt>
<dt>
<tt class="descname">Thread.</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.Stack.Stack.keep_handling_events">
<tt class="descname">keep_handling_events</tt><a class="headerlink" href="#ZDStack.Stack.Stack.keep_handling_events" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A boolean that, when set to False, stops the Event Handling</tt></dt>
<dt>
<tt class="descname">Thread.</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.Stack.Stack.regexps">
<tt class="descname">regexps</tt><a class="headerlink" href="#ZDStack.Stack.Stack.regexps" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A list of :class:`~ZDStack.ZDSRegexps.Regexp` instances used to</tt></dt>
<dt>
<tt class="descname">parse :class:`~ZDStack.ZServ` events.</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.Stack.Stack.event_handler">
<tt class="descname">event_handler</tt><a class="headerlink" href="#ZDStack.Stack.Stack.event_handler" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A :class:`~ZDStack.ZDSEventHandler.ZServEventHandler` that</tt></dt>
<dt>
<tt class="descname">handles :class:`~ZDStack.ZServ.ZServ` events.</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.Stack.Stack.output_queue">
<tt class="descname">output_queue</tt><a class="headerlink" href="#ZDStack.Stack.Stack.output_queue" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A Queue where output lines are placed to be processed.</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.Stack.Stack.event_queue">
<tt class="descname">event_queue</tt><a class="headerlink" href="#ZDStack.Stack.Stack.event_queue" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A Queue where events are placed to be processed.</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.Stack.Stack.loglink_check_timer">
<tt class="descname">loglink_check_timer</tt><a class="headerlink" href="#ZDStack.Stack.Stack.loglink_check_timer" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A Timer that checks each :class:`~ZDStack.ZServ.ZServ`'s</tt></dt>
<dt>
<tt class="descname">logfile links every 30 minutes.</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.Stack.Stack.zserv_check_timer">
<tt class="descname">zserv_check_timer</tt><a class="headerlink" href="#ZDStack.Stack.Stack.zserv_check_timer" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A Timer that restarts each crashed ZServ every 500 milliseconds.</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.Stack.Stack.zdaemon_banlist_fetch_timer">
<tt class="descname">zdaemon_banlist_fetch_timer</tt><a class="headerlink" href="#ZDStack.Stack.Stack.zdaemon_banlist_fetch_timer" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A Timer that fetches the ZDaemon master banlist ever 15 minutes.</tt></dt>
<dd></dd></dl>

<p>Stack does the following things:</p>
<blockquote>
<ul class="simple">
<li>Checks that all server log links and FIFOs exist every 30 min.</li>
<li>Checks that all ZServs are running every 500
milliseconds</li>
<li>Polls all ZServs for output</li>
<li>Parses ZServ output lines into events</li>
<li>Passes events to the EventHandler and the ZServ&#8217;s plugins</li>
<li>Handles incoming RPC requests</li>
</ul>
</blockquote>
<dl class="method">
<dt id="ZDStack.Stack.Stack.add_ban">
<tt class="descname">add_ban</tt><big>(</big><em>zserv_name</em>, <em>ip_address</em>, <em>reason='rofl'</em><big>)</big><a class="headerlink" href="#ZDStack.Stack.Stack.add_ban" title="Permalink to this definition">¶</a></dt>
<dd>Alias for :func:addban.</dd></dl>

<dl class="method">
<dt id="ZDStack.Stack.Stack.add_global_ban">
<tt class="descname">add_global_ban</tt><big>(</big><em>ip_address</em>, <em>reason='rofl'</em><big>)</big><a class="headerlink" href="#ZDStack.Stack.Stack.add_global_ban" title="Permalink to this definition">¶</a></dt>
<dd><p>Adds an address to the global banlist.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><em>ip_address</em> (string) &#8211; the IP address to ban</li>
<li><em>reason</em> (string) &#8211; the reason for the ban</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.Stack.Stack.add_global_whitelist">
<tt class="descname">add_global_whitelist</tt><big>(</big><em>ip_address</em><big>)</big><a class="headerlink" href="#ZDStack.Stack.Stack.add_global_whitelist" title="Permalink to this definition">¶</a></dt>
<dd><p>Adds an address to the global whitelist.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>ip_address</em> (string) &#8211; the IP address to whitelist</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.Stack.Stack.add_whitelist">
<tt class="descname">add_whitelist</tt><big>(</big><em>zserv_name</em>, <em>ip_address</em><big>)</big><a class="headerlink" href="#ZDStack.Stack.Stack.add_whitelist" title="Permalink to this definition">¶</a></dt>
<dd><p>Adds an address to a ZServ&#8217;s whitelist.&#8221;</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><em>zserv_name</em> (string) &#8211; the name of the ZServ to which the
whitelist should be added</li>
<li><em>ip_address</em> (string) &#8211; the IP address to whitelist</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.Stack.Stack.addban">
<tt class="descname">addban</tt><big>(</big><em>zserv_name</em>, <em>ip_address</em>, <em>reason='rofl'</em><big>)</big><a class="headerlink" href="#ZDStack.Stack.Stack.addban" title="Permalink to this definition">¶</a></dt>
<dd><p>Adds an address to a ZServ&#8217;s banlist.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><em>zserv_name</em> (string) &#8211; the name of the ZServ to which the ban
should be added</li>
<li><em>ip_address</em> (string) &#8211; the IP address to ban</li>
<li><em>reason</em> (string) &#8211; the reason for the ban</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.Stack.Stack.addbot">
<tt class="descname">addbot</tt><big>(</big><em>zserv_name</em>, <em>bot_name=None</em><big>)</big><a class="headerlink" href="#ZDStack.Stack.Stack.addbot" title="Permalink to this definition">¶</a></dt>
<dd><p>Adds a bot.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><em>zserv_name</em> (string) &#8211; the name of the ZServ</li>
<li><em>bot_name</em> (string) &#8211; the name of the bot to add</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.Stack.Stack.addmap">
<tt class="descname">addmap</tt><big>(</big><em>zserv_name</em>, <em>map_number</em><big>)</big><a class="headerlink" href="#ZDStack.Stack.Stack.addmap" title="Permalink to this definition">¶</a></dt>
<dd><p>Adds a map to the maplist.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><em>zserv_name</em> (string) &#8211; the name of the ZServ</li>
<li><em>map_number</em> (string) &#8211; the number of the map to add</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.Stack.Stack.check_all_zserv_configs">
<tt class="descname">check_all_zserv_configs</tt><big>(</big><em>configparser</em><big>)</big><a class="headerlink" href="#ZDStack.Stack.Stack.check_all_zserv_configs" title="Permalink to this definition">¶</a></dt>
<dd><p>Ensures that all ZServ configuration sections are correct.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>configparser</em> (<tt class="xref docutils literal"><span class="pre">ZDSConfigParser</span></tt>) &#8211; the configuration to check</td>
</tr>
</tbody>
</table>
<p>If a configuration error is found, an Exception is raised.</p>
</dd></dl>

<dl class="method">
<dt id="ZDStack.Stack.Stack.clearmaplist">
<tt class="descname">clearmaplist</tt><big>(</big><em>zserv_name</em><big>)</big><a class="headerlink" href="#ZDStack.Stack.Stack.clearmaplist" title="Permalink to this definition">¶</a></dt>
<dd><p>Clears the maplist.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>zserv_name</em> (string) &#8211; the name of the ZServ</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.Stack.Stack.delete_ban">
<tt class="descname">delete_ban</tt><big>(</big><em>zserv_name</em>, <em>ip_address</em><big>)</big><a class="headerlink" href="#ZDStack.Stack.Stack.delete_ban" title="Permalink to this definition">¶</a></dt>
<dd>Alias for :func:killban.</dd></dl>

<dl class="method">
<dt id="ZDStack.Stack.Stack.delete_whitelist">
<tt class="descname">delete_whitelist</tt><big>(</big><em>zserv_name</em>, <em>ip_address</em><big>)</big><a class="headerlink" href="#ZDStack.Stack.Stack.delete_whitelist" title="Permalink to this definition">¶</a></dt>
<dd>Alias for :func:remove_whitelist.</dd></dl>

<dl class="method">
<dt id="ZDStack.Stack.Stack.fetch_zdaemon_banlist">
<tt class="descname">fetch_zdaemon_banlist</tt><big>(</big><big>)</big><a class="headerlink" href="#ZDStack.Stack.Stack.fetch_zdaemon_banlist" title="Permalink to this definition">¶</a></dt>
<dd>Fetches the ZDaemon banlist for servers who have it copied.</dd></dl>

<dl class="method">
<dt id="ZDStack.Stack.Stack.get">
<tt class="descname">get</tt><big>(</big><em>zserv_name</em>, <em>variable_name</em><big>)</big><a class="headerlink" href="#ZDStack.Stack.Stack.get" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets the value of a variable.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><em>zserv_name</em> (string) &#8211; the name of the ZServ</li>
<li><em>variable_name</em> (string) &#8211; the name of the variable</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">string</p>
</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">the value of the variable as a string</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.Stack.Stack.get_all_zserv_info">
<tt class="descname">get_all_zserv_info</tt><big>(</big><em>names=None</em><big>)</big><a class="headerlink" href="#ZDStack.Stack.Stack.get_all_zserv_info" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a list of zserv info dicts.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>names</em> (list of strings) &#8211; an optional list of zserv_names for which to
return information - used as a limit.</td>
</tr>
</tbody>
</table>
<p>See get_zserv_info() for more information.</p>
</dd></dl>

<dl class="method">
<dt id="ZDStack.Stack.Stack.get_running_zservs">
<tt class="descname">get_running_zservs</tt><big>(</big><big>)</big><a class="headerlink" href="#ZDStack.Stack.Stack.get_running_zservs" title="Permalink to this definition">¶</a></dt>
<dd>Returns a list of ZServs whose internal zserv is running.</dd></dl>

<dl class="method">
<dt id="ZDStack.Stack.Stack.get_stopped_zservs">
<tt class="descname">get_stopped_zservs</tt><big>(</big><big>)</big><a class="headerlink" href="#ZDStack.Stack.Stack.get_stopped_zservs" title="Permalink to this definition">¶</a></dt>
<dd>Returns a list of ZServs whose internal zserv isn&#8217;t running.</dd></dl>

<dl class="method">
<dt id="ZDStack.Stack.Stack.get_zserv">
<tt class="descname">get_zserv</tt><big>(</big><em>zserv_name</em><big>)</big><a class="headerlink" href="#ZDStack.Stack.Stack.get_zserv" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a ZServ instance.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>zserv_name</em> (string) &#8211; the name of the ZServ to start</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.Stack.Stack.get_zserv_config">
<tt class="descname">get_zserv_config</tt><big>(</big><em>zserv_name</em><big>)</big><a class="headerlink" href="#ZDStack.Stack.Stack.get_zserv_config" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a ZServ&#8217;s configuration as a string.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>zserv_name</em> (string) &#8211; the zserv&#8217;s name</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.Stack.Stack.get_zserv_info">
<tt class="descname">get_zserv_info</tt><big>(</big><em>zserv_name</em><big>)</big><a class="headerlink" href="#ZDStack.Stack.Stack.get_zserv_info" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a dict of zserv info.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>zserv_name</em> (string) &#8211; the name of the ZServ to get info for</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">dict</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body">{&#8216;name&#8217;: &lt;string: internal name of ZServ&gt;,
&#8216;hostname&#8217;: &lt;string: hostname of ZServ&gt;,
&#8216;mode&#8217;: &lt;string: Game mode of ZServ&gt;,
&#8216;wads&#8217;: &lt;strings: list of ZServ&#8217;s WADs&gt;,
&#8216;optional_wads&#8217;: &lt;strings: list of ZServ&#8217;s optional WADs&gt;,
&#8216;ip&#8217;: &lt;string: the ZServ&#8217;s IP address&gt;,
&#8216;port&#8217;: &lt;int: ZServ&#8217;s port&gt;,
&#8216;players&#8217;: &lt;int: number of connected players&gt;,
&#8216;max_players&#8217;: &lt;int: maximum number of connected players&gt;,
&#8216;map_name&#8217;: &lt;string: name of the current map&gt;,
&#8216;map_number&#8217;: &lt;int: number of the current map&gt;,
&#8216;round_id&#8217;: &lt;int: ID of the current round&gt;,
&#8216;is_running&#8217;: &lt;boolean: whether ZServ is currently running&gt;}</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.Stack.Stack.handle_events">
<tt class="descname">handle_events</tt><big>(</big><em>event</em>, <em>zserv</em><big>)</big><a class="headerlink" href="#ZDStack.Stack.Stack.handle_events" title="Permalink to this definition">¶</a></dt>
<dd><p>Handles events.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><em>event</em> (<tt class="xref docutils literal"><span class="pre">LogEvent</span></tt>) &#8211; the event to handle</li>
<li><em>zserv</em> (<a title="ZDStack.ZServ.ZServ" class="reference internal" href="#ZDStack.ZServ.ZServ"><tt class="xref docutils literal"><span class="pre">ZServ</span></tt></a>) &#8211; the <a title="ZDStack.ZServ.ZServ" class="reference internal" href="#ZDStack.ZServ.ZServ"><tt class="xref docutils literal"><span class="pre">ZServ</span></tt></a> instance that
generated the event.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.Stack.Stack.kick">
<tt class="descname">kick</tt><big>(</big><em>zserv_name</em>, <em>player_number</em>, <em>reason='rofl'</em><big>)</big><a class="headerlink" href="#ZDStack.Stack.Stack.kick" title="Permalink to this definition">¶</a></dt>
<dd><p>Kicks a player from the zserv.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><em>zserv_name</em> (string) &#8211; the name of the ZServ</li>
<li><em>player_number</em> (string) &#8211; the numer of the player to kick</li>
<li><em>reason</em> (string) &#8211; the reason for the kick</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.Stack.Stack.killban">
<tt class="descname">killban</tt><big>(</big><em>zserv_name</em>, <em>ip_address</em><big>)</big><a class="headerlink" href="#ZDStack.Stack.Stack.killban" title="Permalink to this definition">¶</a></dt>
<dd><p>Removes an address from a ZServ&#8217;s banlist.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><em>zserv_name</em> (string) &#8211; the name of the ZServ from which the ban
should be removed</li>
<li><em>ip_address</em> (string) &#8211; the ip address to remove</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.Stack.Stack.list_zserv_names">
<tt class="descname">list_zserv_names</tt><big>(</big><em>names=None</em><big>)</big><a class="headerlink" href="#ZDStack.Stack.Stack.list_zserv_names" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a list of ZServ names.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>names</em> (list of strings) &#8211; an optional list of zserv_names which are to
be returned - used as a limit</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.Stack.Stack.load_config">
<tt class="descname">load_config</tt><big>(</big><em>config</em>, <em>reload=False</em><big>)</big><a class="headerlink" href="#ZDStack.Stack.Stack.load_config" title="Permalink to this definition">¶</a></dt>
<dd><p>Loads the configuration.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><em>config</em> (<a title="ZDStack.ZDSConfigParser.ZDSConfigParser" class="reference internal" href="#ZDStack.ZDSConfigParser.ZDSConfigParser"><tt class="xref docutils literal"><span class="pre">ZDSConfigParser</span></tt></a>) &#8211; the configuration to load</li>
<li><em>reload</em> (boolean) &#8211; whether or not the config is being reloaded</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.Stack.Stack.load_zservs">
<tt class="descname">load_zservs</tt><big>(</big><big>)</big><a class="headerlink" href="#ZDStack.Stack.Stack.load_zservs" title="Permalink to this definition">¶</a></dt>
<dd>Instantiates all configured ZServs.</dd></dl>

<dl class="method">
<dt id="ZDStack.Stack.Stack.map">
<tt class="descname">map</tt><big>(</big><em>zserv_name</em>, <em>map_number</em><big>)</big><a class="headerlink" href="#ZDStack.Stack.Stack.map" title="Permalink to this definition">¶</a></dt>
<dd><p>Changes the current map.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><em>zserv_name</em> (string) &#8211; the name of the ZServ</li>
<li><em>map_number</em> (string) &#8211; the number of the map to change to</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.Stack.Stack.maplist">
<tt class="descname">maplist</tt><big>(</big><em>zserv_name</em><big>)</big><a class="headerlink" href="#ZDStack.Stack.Stack.maplist" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the maplist.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>zserv_name</em> (string) &#8211; the name of the ZServ</td>
</tr>
</tbody>
</table>
<p>Returns a list of strings representing the numbers of the maps
in the maplist.</p>
</dd></dl>

<dl class="method">
<dt id="ZDStack.Stack.Stack.parse_zserv_output">
<tt class="descname">parse_zserv_output</tt><big>(</big><em>zserv</em>, <em>dt</em>, <em>lines</em><big>)</big><a class="headerlink" href="#ZDStack.Stack.Stack.parse_zserv_output" title="Permalink to this definition">¶</a></dt>
<dd><p>Parses ZServ output into events, places them in the event queue.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><em>zserv</em> (<a title="ZDStack.ZServ.ZServ" class="reference internal" href="#ZDStack.ZServ.ZServ"><tt class="xref docutils literal"><span class="pre">ZServ</span></tt></a>) &#8211; the output&#8217;s originating
<a title="ZDStack.ZServ.ZServ" class="reference internal" href="#ZDStack.ZServ.ZServ"><tt class="xref docutils literal"><span class="pre">ZServ</span></tt></a></li>
<li><em>dt</em> (datetime) &#8211; the time when the lines were generated</li>
<li><em>lines</em> (list of strings) &#8211; the output lines</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.Stack.Stack.players">
<tt class="descname">players</tt><big>(</big><em>zserv_name</em><big>)</big><a class="headerlink" href="#ZDStack.Stack.Stack.players" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a list of players and their info.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><p class="first"><em>zserv_name</em> (string) &#8211; the name of the ZServ</p>
</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">list of <tt class="xref docutils literal"><span class="pre">LogEvent</span></tt> instances</p>
</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Each <tt class="xref docutils literal"><span class="pre">LogEvent</span></tt> instance represents one line of the
of the zserv&#8217;s response.  The dict looks like:
{&#8216;player_num&#8217;: 0, &#8216;player_name&#8217;: &#8216;superman&#8217;,</p>
<blockquote class="last">
<p>&#8216;player_ip&#8217;: &#8216;127.0.0.1&#8217;, &#8216;player_port&#8217;: 40667}</p>
</blockquote>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.Stack.Stack.poll_zservs">
<tt class="descname">poll_zservs</tt><big>(</big><big>)</big><a class="headerlink" href="#ZDStack.Stack.Stack.poll_zservs" title="Permalink to this definition">¶</a></dt>
<dd>Polls all ZServs for output.</dd></dl>

<dl class="method">
<dt id="ZDStack.Stack.Stack.register_functions">
<tt class="descname">register_functions</tt><big>(</big><big>)</big><a class="headerlink" href="#ZDStack.Stack.Stack.register_functions" title="Permalink to this definition">¶</a></dt>
<dd>Registers RPC functions.</dd></dl>

<dl class="method">
<dt id="ZDStack.Stack.Stack.remove_ban">
<tt class="descname">remove_ban</tt><big>(</big><em>zserv_name</em>, <em>ip_address</em><big>)</big><a class="headerlink" href="#ZDStack.Stack.Stack.remove_ban" title="Permalink to this definition">¶</a></dt>
<dd>Alias for :func:killban.</dd></dl>

<dl class="method">
<dt id="ZDStack.Stack.Stack.remove_global_ban">
<tt class="descname">remove_global_ban</tt><big>(</big><em>ip_address</em><big>)</big><a class="headerlink" href="#ZDStack.Stack.Stack.remove_global_ban" title="Permalink to this definition">¶</a></dt>
<dd><p>Removes an address from the global banlist.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>ip_address</em> (string) &#8211; the IP address to ban</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.Stack.Stack.remove_global_whitelist">
<tt class="descname">remove_global_whitelist</tt><big>(</big><em>ip_address</em><big>)</big><a class="headerlink" href="#ZDStack.Stack.Stack.remove_global_whitelist" title="Permalink to this definition">¶</a></dt>
<dd><p>Removes an address from the global whitelist.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>ip_address</em> (string) &#8211; the IP address to whitelist</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.Stack.Stack.remove_whitelist">
<tt class="descname">remove_whitelist</tt><big>(</big><em>zserv_name</em>, <em>ip_address</em><big>)</big><a class="headerlink" href="#ZDStack.Stack.Stack.remove_whitelist" title="Permalink to this definition">¶</a></dt>
<dd><p>Adds an address to a ZServ&#8217;s whitelist.&#8221;</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><em>zserv_name</em> (string) &#8211; the name of the ZServ to which the
whitelist should be added</li>
<li><em>ip_address</em> (string) &#8211; the IP address to whitelist</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.Stack.Stack.removebots">
<tt class="descname">removebots</tt><big>(</big><em>zserv_name</em><big>)</big><a class="headerlink" href="#ZDStack.Stack.Stack.removebots" title="Permalink to this definition">¶</a></dt>
<dd><p>Removes all bots.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>zserv_name</em> (string) &#8211; the name of the ZServ</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.Stack.Stack.resetscores">
<tt class="descname">resetscores</tt><big>(</big><em>zserv_name</em><big>)</big><a class="headerlink" href="#ZDStack.Stack.Stack.resetscores" title="Permalink to this definition">¶</a></dt>
<dd><p>Resets all scores.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>zserv_name</em> (string) &#8211; the name of the ZServ</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.Stack.Stack.restart_all_zservs">
<tt class="descname">restart_all_zservs</tt><big>(</big><em>names=None</em><big>)</big><a class="headerlink" href="#ZDStack.Stack.Stack.restart_all_zservs" title="Permalink to this definition">¶</a></dt>
<dd><p>Restarts all ZServs.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>names</em> (list of strings) &#8211; an optional list of zserv_names which are to
be stopped - used as a limit</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.Stack.Stack.restart_zserv">
<tt class="descname">restart_zserv</tt><big>(</big><em>zserv_name</em><big>)</big><a class="headerlink" href="#ZDStack.Stack.Stack.restart_zserv" title="Permalink to this definition">¶</a></dt>
<dd><p>Restarts a ZServ.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>zserv_name</em> (string) &#8211; the name of the ZServ to start</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.Stack.Stack.say">
<tt class="descname">say</tt><big>(</big><em>zserv_name</em>, <em>message</em><big>)</big><a class="headerlink" href="#ZDStack.Stack.Stack.say" title="Permalink to this definition">¶</a></dt>
<dd><p>Sends a message from &#8220;] CONSOLE [&#8220;.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><em>zserv_name</em> (string) &#8211; the name of the ZServ</li>
<li><em>message</em> (string) &#8211; the message to send</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.Stack.Stack.send_to_zserv">
<tt class="descname">send_to_zserv</tt><big>(</big><em>zserv_name</em>, <em>message</em><big>)</big><a class="headerlink" href="#ZDStack.Stack.Stack.send_to_zserv" title="Permalink to this definition">¶</a></dt>
<dd><p>Sends a command to a running zserv process.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><em>zserv_name</em> (string) &#8211; the name of the ZServ to send the message to</li>
<li><em>message</em> (string) &#8211; the message to send</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.Stack.Stack.set">
<tt class="descname">set</tt><big>(</big><em>zserv_name</em>, <em>variable_name</em>, <em>variable_value</em><big>)</big><a class="headerlink" href="#ZDStack.Stack.Stack.set" title="Permalink to this definition">¶</a></dt>
<dd><p>Sets the value of a variable</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><em>zserv_name</em> (string) &#8211; the name of the ZServ</li>
<li><em>variable_name</em> (string) &#8211; the name of the variable</li>
<li><em>variable_value</em> (string) &#8211; the new value of the variable</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.Stack.Stack.set_zserv_config">
<tt class="descname">set_zserv_config</tt><big>(</big><em>zserv_name</em>, <em>data</em><big>)</big><a class="headerlink" href="#ZDStack.Stack.Stack.set_zserv_config" title="Permalink to this definition">¶</a></dt>
<dd><p>Sets a ZServ&#8217;s config.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><em>zserv_name</em> (string) &#8211; the zserv&#8217;s name</li>
<li><em>data</em> (string) &#8211; the new configuration data</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.Stack.Stack.spawn_zservs">
<tt class="descname">spawn_zservs</tt><big>(</big><big>)</big><a class="headerlink" href="#ZDStack.Stack.Stack.spawn_zservs" title="Permalink to this definition">¶</a></dt>
<dd>Spawns zservs, respawning if they&#8217;ve crashed.</dd></dl>

<dl class="method">
<dt id="ZDStack.Stack.Stack.start">
<tt class="descname">start</tt><big>(</big><big>)</big><a class="headerlink" href="#ZDStack.Stack.Stack.start" title="Permalink to this definition">¶</a></dt>
<dd>Starts this Stack.</dd></dl>

<dl class="method">
<dt id="ZDStack.Stack.Stack.start_all_zservs">
<tt class="descname">start_all_zservs</tt><big>(</big><em>names=None</em><big>)</big><a class="headerlink" href="#ZDStack.Stack.Stack.start_all_zservs" title="Permalink to this definition">¶</a></dt>
<dd><p>Starts all ZServs.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>names</em> (list of strings) &#8211; an optional list of zserv_names which are to
be started - used as a limit</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.Stack.Stack.start_checking_loglinks">
<tt class="descname">start_checking_loglinks</tt><big>(</big><big>)</big><a class="headerlink" href="#ZDStack.Stack.Stack.start_checking_loglinks" title="Permalink to this definition">¶</a></dt>
<dd>Starts checking every ZServ&#8217;s log links every 30 minutes.</dd></dl>

<dl class="method">
<dt id="ZDStack.Stack.Stack.start_zserv">
<tt class="descname">start_zserv</tt><big>(</big><em>zserv_name</em><big>)</big><a class="headerlink" href="#ZDStack.Stack.Stack.start_zserv" title="Permalink to this definition">¶</a></dt>
<dd><p>Starts a ZServ.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>zserv_name</em> (string) &#8211; the name of the ZServ to start</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.Stack.Stack.stop">
<tt class="descname">stop</tt><big>(</big><big>)</big><a class="headerlink" href="#ZDStack.Stack.Stack.stop" title="Permalink to this definition">¶</a></dt>
<dd>Stops this Stack.</dd></dl>

<dl class="method">
<dt id="ZDStack.Stack.Stack.stop_all_zservs">
<tt class="descname">stop_all_zservs</tt><big>(</big><em>names=None</em><big>)</big><a class="headerlink" href="#ZDStack.Stack.Stack.stop_all_zservs" title="Permalink to this definition">¶</a></dt>
<dd><p>Stops all ZServs.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>names</em> (list of strings) &#8211; an optional list of zserv_names which are to
be stopped - used as a limit</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.Stack.Stack.stop_zserv">
<tt class="descname">stop_zserv</tt><big>(</big><em>zserv_name</em><big>)</big><a class="headerlink" href="#ZDStack.Stack.Stack.stop_zserv" title="Permalink to this definition">¶</a></dt>
<dd><p>Stops a ZServ.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>zserv_name</em> (string) &#8211; the name of the ZServ to start</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.Stack.Stack.toggle">
<tt class="descname">toggle</tt><big>(</big><em>zserv_name</em>, <em>boolean_variable</em><big>)</big><a class="headerlink" href="#ZDStack.Stack.Stack.toggle" title="Permalink to this definition">¶</a></dt>
<dd><p>Toggles a boolean option.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><em>zserv_name</em> (string) &#8211; the name of the ZServ</li>
<li><em>boolean_variable</em> (string) &#8211; the name of the variable</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.Stack.Stack.unset">
<tt class="descname">unset</tt><big>(</big><em>zserv_name</em>, <em>variable_name</em><big>)</big><a class="headerlink" href="#ZDStack.Stack.Stack.unset" title="Permalink to this definition">¶</a></dt>
<dd><p>Unsets a variable (removes it).</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><em>zserv_name</em> (string) &#8211; the name of the ZServ</li>
<li><em>variable_name</em> (string) &#8211; the name of the variable</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.Stack.Stack.wads">
<tt class="descname">wads</tt><big>(</big><em>zserv_name</em><big>)</big><a class="headerlink" href="#ZDStack.Stack.Stack.wads" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a list of the used WADs.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>zserv_name</em> (string) &#8211; the name of the ZServ</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">list of strings</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body">Each list member is the name of a used WAD.</td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

</div>
<div class="section" id="module-ZDStack.Token">
<h2>ZDStack.Token<a class="headerlink" href="#module-ZDStack.Token" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="ZDStack.Token.Token">
<em class="property">class </em><tt class="descclassname">ZDStack.Token.</tt><tt class="descname">Token</tt><big>(</big><em>contents</em>, <em>opener=''</em>, <em>closer=''</em><big>)</big><a class="headerlink" href="#ZDStack.Token.Token" title="Permalink to this definition">¶</a></dt>
<dd>Used when parsing player names.</dd></dl>

</div>
<div class="section" id="module-ZDStack.Utils">
<h2>ZDStack.Utils<a class="headerlink" href="#module-ZDStack.Utils" title="Permalink to this headline">¶</a></h2>
<dl class="function">
<dt id="ZDStack.Utils.check_ip">
<tt class="descclassname">ZDStack.Utils.</tt><tt class="descname">check_ip</tt><big>(</big><em>ip</em><big>)</big><a class="headerlink" href="#ZDStack.Utils.check_ip" title="Permalink to this definition">¶</a></dt>
<dd><p>Checks that a string is a properly formed IP address.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>ip</em> (string) &#8211; the string to check</td>
</tr>
</tbody>
</table>
<p>Raises an Exception if the IP address is malformed.  This method
also raises an Exception if the address is either a broadcast or
private address.</p>
</dd></dl>

<dl class="function">
<dt id="ZDStack.Utils.create_file">
<tt class="descclassname">ZDStack.Utils.</tt><tt class="descname">create_file</tt><big>(</big><em>filepath</em><big>)</big><a class="headerlink" href="#ZDStack.Utils.create_file" title="Permalink to this definition">¶</a></dt>
<dd><p>Creates a file with proper permissions.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>filepath</em> (string) &#8211; the full path to the file to create</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="ZDStack.Utils.get_event_from_line">
<tt class="descclassname">ZDStack.Utils.</tt><tt class="descname">get_event_from_line</tt><big>(</big><em>line</em>, <em>regexps</em>, <em>now=None</em><big>)</big><a class="headerlink" href="#ZDStack.Utils.get_event_from_line" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets a <a title="ZDStack.LogEvent.LogEvent" class="reference internal" href="#ZDStack.LogEvent.LogEvent"><tt class="xref docutils literal"><span class="pre">LogEvent</span></tt></a> from a line.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><em>line</em> (string) &#8211; the line from which to return an event</li>
<li><em>regexps</em> (list of compiled regexp instances) &#8211; the regexps with which to parse the line</li>
<li><em>now</em> (datetime) &#8211; the time to use for the event&#8217;s event_dt parameter, if
not given, datetime.datetime.now() is used.</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">a <a title="ZDStack.LogEvent.LogEvent" class="reference internal" href="#ZDStack.LogEvent.LogEvent"><tt class="xref docutils literal"><span class="pre">LogEvent</span></tt></a> parsed from the
given line or None</p>
</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a title="ZDStack.LogEvent.LogEvent" class="reference internal" href="#ZDStack.LogEvent.LogEvent"><tt class="xref docutils literal"><span class="pre">LogEvent</span></tt></a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="ZDStack.Utils.homogenize">
<tt class="descclassname">ZDStack.Utils.</tt><tt class="descname">homogenize</tt><big>(</big><em>s</em><big>)</big><a class="headerlink" href="#ZDStack.Utils.homogenize" title="Permalink to this definition">¶</a></dt>
<dd><p>Homogenizes a string.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>s</em> (string) &#8211; a string to homogenize</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">string</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body">a homogenized string, with spaces, newlines, and tabs
removed</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="ZDStack.Utils.html_escape">
<tt class="descclassname">ZDStack.Utils.</tt><tt class="descname">html_escape</tt><big>(</big><em>s</em><big>)</big><a class="headerlink" href="#ZDStack.Utils.html_escape" title="Permalink to this definition">¶</a></dt>
<dd><p>Escapes HTML.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>s</em> (string) &#8211; a string to escape</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">string</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body">an escaped string</td>
</tr>
</tbody>
</table>
<p>This function is basically ripped from web.py; with any luck,
the MIT and BSD licenses are compatible... :)  I don&#8217;t think
Mr. Swartz would have a cow, tho.</p>
</dd></dl>

<dl class="function">
<dt id="ZDStack.Utils.parse_ban_line">
<tt class="descclassname">ZDStack.Utils.</tt><tt class="descname">parse_ban_line</tt><big>(</big><em>line</em><big>)</big><a class="headerlink" href="#ZDStack.Utils.parse_ban_line" title="Permalink to this definition">¶</a></dt>
<dd><p>Converts a properly formatted string into a <a title="ZDStack.ZDSAccessList.Ban" class="reference internal" href="#ZDStack.ZDSAccessList.Ban"><tt class="xref docutils literal"><span class="pre">Ban</span></tt></a></p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>line</em> (string) &#8211; a line to convert</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><a title="ZDStack.ZDSAccessList.Ban" class="reference internal" href="#ZDStack.ZDSAccessList.Ban"><tt class="xref docutils literal"><span class="pre">Ban</span></tt></a></td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="ZDStack.Utils.parse_player_name">
<tt class="descclassname">ZDStack.Utils.</tt><tt class="descname">parse_player_name</tt><big>(</big><em>name</em><big>)</big><a class="headerlink" href="#ZDStack.Utils.parse_player_name" title="Permalink to this definition">¶</a></dt>
<dd><p>Parses a player&#8217;s name into a tag and a base player name.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>name</em> (string) &#8211; the raw name to parse</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">a 2-Tuple of strings</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body">(&#8216;tag&#8217;, &#8216;name&#8217;)</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="ZDStack.Utils.requires_instance_lock">
<tt class="descclassname">ZDStack.Utils.</tt><tt class="descname">requires_instance_lock</tt><big>(</big><big>)</big><a class="headerlink" href="#ZDStack.Utils.requires_instance_lock" title="Permalink to this definition">¶</a></dt>
<dd><p>Like requires_lock, but it acquires its parent&#8217;s instance lock.</p>
<p>This function decorator works on instance methods, acquiring their
parent instance&#8217;s lock before executing.</p>
</dd></dl>

<dl class="function">
<dt id="ZDStack.Utils.requires_lock">
<tt class="descclassname">ZDStack.Utils.</tt><tt class="descname">requires_lock</tt><big>(</big><em>lck</em><big>)</big><a class="headerlink" href="#ZDStack.Utils.requires_lock" title="Permalink to this definition">¶</a></dt>
<dd><p>A function decorator that acquires a lock before executing.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>lck</em> (<tt class="xref docutils literal"><span class="pre">Lock</span></tt>) &#8211; the <tt class="xref docutils literal"><span class="pre">Lock</span></tt> that the function requires</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="ZDStack.Utils.resolve_path">
<tt class="descclassname">ZDStack.Utils.</tt><tt class="descname">resolve_path</tt><big>(</big><em>f</em><big>)</big><a class="headerlink" href="#ZDStack.Utils.resolve_path" title="Permalink to this definition">¶</a></dt>
<dd><p>Resolves a path.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>f</em> (string) &#8211; a path to resolve</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">string</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body">The expanded, absolute path of a given file/folder.</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="ZDStack.Utils.send_proxy_method">
<tt class="descclassname">ZDStack.Utils.</tt><tt class="descname">send_proxy_method</tt><big>(</big><em>proxy</em>, <em>method_name</em>, <em>*args</em><big>)</big><a class="headerlink" href="#ZDStack.Utils.send_proxy_method" title="Permalink to this definition">¶</a></dt>
<dd><p>Sends an RPC request, returning the result or printing an error.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><em>proxy</em> (XMLProxy or JSONProxy) &#8211; an RPC proxy, either JSON or XML</li>
<li><em>method_name</em> (string) &#8211; the name of the method to remotely execute</li>
<li><em>args</em> &#8211; other positional arguments to pass to the RPC method</li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>If an error occurs, it will be printed to STDERR.  This is because
this method is primarily for use by scripts trying to interact
with a running ZDStack.</p>
</dd></dl>

<dl class="function">
<dt id="ZDStack.Utils.timedelta_in_seconds">
<tt class="descclassname">ZDStack.Utils.</tt><tt class="descname">timedelta_in_seconds</tt><big>(</big><em>td</em><big>)</big><a class="headerlink" href="#ZDStack.Utils.timedelta_in_seconds" title="Permalink to this definition">¶</a></dt>
<dd><p>Converts a timedelta into seconds.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>td</em> (timedelta) &#8211; a timedelta to convert</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">int</td>
</tr>
</tbody>
</table>
</dd></dl>

</div>
<div class="section" id="module-ZDStack.ZDSAccessList">
<h2>ZDStack.ZDSAccessList<a class="headerlink" href="#module-ZDStack.ZDSAccessList" title="Permalink to this headline">¶</a></h2>
<dl class="exception">
<dt id="ZDStack.ZDSAccessList.AddressError">
<em class="property">exception </em><tt class="descclassname">ZDStack.ZDSAccessList.</tt><tt class="descname">AddressError</tt><big>(</big><em>msg</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSAccessList.AddressError" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="class">
<dt id="ZDStack.ZDSAccessList.AddressList">
<em class="property">class </em><tt class="descclassname">ZDStack.ZDSAccessList.</tt><tt class="descname">AddressList</tt><big>(</big><em>item_class</em>, <em>filename=None</em>, <em>dummy=False</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSAccessList.AddressList" title="Permalink to this definition">¶</a></dt>
<dd><dl class="method">
<dt id="ZDStack.ZDSAccessList.AddressList.add">
<tt class="descname">add</tt><big>(</big><em>*__args</em>, <em>**__kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSAccessList.AddressList.add" title="Permalink to this definition">¶</a></dt>
<dd><p>Adds an address to a ZServ&#8217;s list.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><em>zserv</em> (<a title="ZDStack.ZServ.ZServ" class="reference internal" href="#ZDStack.ZServ.ZServ"><tt class="xref docutils literal"><span class="pre">ZServ</span></tt></a>) &#8211; a <a title="ZDStack.ZServ.ZServ" class="reference internal" href="#ZDStack.ZServ.ZServ"><tt class="xref docutils literal"><span class="pre">ZServ</span></tt></a> to add the
address to</li>
<li><em>address</em> (string) &#8211; an address to add to the list</li>
<li><em>reason</em> (string) &#8211; reason for adding the address (optional)</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSAccessList.AddressList.add_global">
<tt class="descname">add_global</tt><big>(</big><em>*__args</em>, <em>**__kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSAccessList.AddressList.add_global" title="Permalink to this definition">¶</a></dt>
<dd><p>Adds an address to the global list.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><em>address</em> (string) &#8211; an address to add to the list</li>
<li><em>reason</em> (string) &#8211; reason for adding the address (optional)</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSAccessList.AddressList.get">
<tt class="descname">get</tt><big>(</big><em>*__args</em>, <em>**__kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSAccessList.AddressList.get" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets an address from a ZServ&#8217;s list.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><em>zserv</em> (<a title="ZDStack.ZServ.ZServ" class="reference internal" href="#ZDStack.ZServ.ZServ"><tt class="xref docutils literal"><span class="pre">ZServ</span></tt></a>) &#8211; a <a title="ZDStack.ZServ.ZServ" class="reference internal" href="#ZDStack.ZServ.ZServ"><tt class="xref docutils literal"><span class="pre">ZServ</span></tt></a> from which to get
the address</li>
<li><em>address</em> (string) &#8211; an address to remove from the list</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">a matching IP address; searches both the ZServ&#8217;s
address list and the global address list; if no
matching addresses are found, returns None</p>
</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a title="ZDStack.ZDSAccessList.IPAddress" class="reference internal" href="#ZDStack.ZDSAccessList.IPAddress"><tt class="xref docutils literal"><span class="pre">IPAddress</span></tt></a> or None</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSAccessList.AddressList.get_all">
<tt class="descname">get_all</tt><big>(</big><em>*__args</em>, <em>**__kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSAccessList.AddressList.get_all" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets all addresses from a ZServ&#8217;s list.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>zserv</em> (<a title="ZDStack.ZServ.ZServ" class="reference internal" href="#ZDStack.ZServ.ZServ"><tt class="xref docutils literal"><span class="pre">ZServ</span></tt></a>) &#8211; a <a title="ZDStack.ZServ.ZServ" class="reference internal" href="#ZDStack.ZServ.ZServ"><tt class="xref docutils literal"><span class="pre">ZServ</span></tt></a> from which to get
the addresses</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">a sequence of addresses</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSAccessList.AddressList.get_all_excluding_global">
<tt class="descname">get_all_excluding_global</tt><big>(</big><em>*__args</em>, <em>**__kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSAccessList.AddressList.get_all_excluding_global" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets all addresses from a ZServ&#8217;s list, excluding globals.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>zserv</em> (<a title="ZDStack.ZServ.ZServ" class="reference internal" href="#ZDStack.ZServ.ZServ"><tt class="xref docutils literal"><span class="pre">ZServ</span></tt></a>) &#8211; a <a title="ZDStack.ZServ.ZServ" class="reference internal" href="#ZDStack.ZServ.ZServ"><tt class="xref docutils literal"><span class="pre">ZServ</span></tt></a> from which to get
the addresses</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">a sequence of addresses</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSAccessList.AddressList.get_all_global">
<tt class="descname">get_all_global</tt><big>(</big><em>*__args</em>, <em>**__kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSAccessList.AddressList.get_all_global" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets all global addresses.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">a sequence of addresses</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSAccessList.AddressList.get_excluding_global">
<tt class="descname">get_excluding_global</tt><big>(</big><em>*__args</em>, <em>**__kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSAccessList.AddressList.get_excluding_global" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets an address from a ZServ&#8217;s list.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><em>zserv</em> (<a title="ZDStack.ZServ.ZServ" class="reference internal" href="#ZDStack.ZServ.ZServ"><tt class="xref docutils literal"><span class="pre">ZServ</span></tt></a>) &#8211; a <a title="ZDStack.ZServ.ZServ" class="reference internal" href="#ZDStack.ZServ.ZServ"><tt class="xref docutils literal"><span class="pre">ZServ</span></tt></a> from which to get
the address</li>
<li><em>address</em> (string) &#8211; an address to remove from the list</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">a matching IP address; searches only the ZServ&#8217;s
address list</p>
</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last"><a title="ZDStack.ZDSAccessList.IPAddress" class="reference internal" href="#ZDStack.ZDSAccessList.IPAddress"><tt class="xref docutils literal"><span class="pre">IPAddress</span></tt></a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSAccessList.AddressList.get_global">
<tt class="descname">get_global</tt><big>(</big><em>*__args</em>, <em>**__kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSAccessList.AddressList.get_global" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets a global address.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>address</em> (string) &#8211; an address to match up and return</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body">a matching IP address or None if not found</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><a title="ZDStack.ZDSAccessList.IPAddress" class="reference internal" href="#ZDStack.ZDSAccessList.IPAddress"><tt class="xref docutils literal"><span class="pre">IPAddress</span></tt></a></td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSAccessList.AddressList.remove">
<tt class="descname">remove</tt><big>(</big><em>*__args</em>, <em>**__kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSAccessList.AddressList.remove" title="Permalink to this definition">¶</a></dt>
<dd><p>Removes an address from a ZServ&#8217;s list.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><em>zserv</em> (<a title="ZDStack.ZServ.ZServ" class="reference internal" href="#ZDStack.ZServ.ZServ"><tt class="xref docutils literal"><span class="pre">ZServ</span></tt></a>) &#8211; a <a title="ZDStack.ZServ.ZServ" class="reference internal" href="#ZDStack.ZServ.ZServ"><tt class="xref docutils literal"><span class="pre">ZServ</span></tt></a> to remove the
address from</li>
<li><em>address</em> (string) &#8211; an address to remove from the list</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">whether or not the address existed</p>
</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">boolean</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSAccessList.AddressList.remove_global">
<tt class="descname">remove_global</tt><big>(</big><em>*__args</em>, <em>**__kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSAccessList.AddressList.remove_global" title="Permalink to this definition">¶</a></dt>
<dd><p>Removes an address from the global list.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>address</em> (string) &#8211; an address to remove from the list</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body">whether or not the address existed</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">boolean</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSAccessList.AddressList.search">
<tt class="descname">search</tt><big>(</big><em>*__args</em>, <em>**__kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSAccessList.AddressList.search" title="Permalink to this definition">¶</a></dt>
<dd><p>Searches for an address.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><em>zserv</em> (<a title="ZDStack.ZServ.ZServ" class="reference internal" href="#ZDStack.ZServ.ZServ"><tt class="xref docutils literal"><span class="pre">ZServ</span></tt></a>) &#8211; a <a title="ZDStack.ZServ.ZServ" class="reference internal" href="#ZDStack.ZServ.ZServ"><tt class="xref docutils literal"><span class="pre">ZServ</span></tt></a> from which to get
the address</li>
<li><em>address</em> (string) &#8211; an address to search for</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">False if the address is not found, True or the reason
listed with the address if found.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">boolean or string</p>
</td>
</tr>
</tbody>
</table>
<p>This method will search for IP addresses in a ZServ&#8217;s address
list that either match or contain the given address, using the
wildcard expansions supported by
<a title="ZDStack.ZDSAccessList.IPAddress" class="reference internal" href="#ZDStack.ZDSAccessList.IPAddress"><tt class="xref docutils literal"><span class="pre">IPAddress</span></tt></a>.</p>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSAccessList.AddressList.search_excluding_global">
<tt class="descname">search_excluding_global</tt><big>(</big><em>*__args</em>, <em>**__kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSAccessList.AddressList.search_excluding_global" title="Permalink to this definition">¶</a></dt>
<dd><p>Searches for an address.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><em>zserv</em> (<a title="ZDStack.ZServ.ZServ" class="reference internal" href="#ZDStack.ZServ.ZServ"><tt class="xref docutils literal"><span class="pre">ZServ</span></tt></a>) &#8211; a <a title="ZDStack.ZServ.ZServ" class="reference internal" href="#ZDStack.ZServ.ZServ"><tt class="xref docutils literal"><span class="pre">ZServ</span></tt></a> from which to get
the address</li>
<li><em>address</em> (string) &#8211; an address to search for</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">False if the address is not found, True or the reason
listed with the address if found.</p>
</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">boolean or string</p>
</td>
</tr>
</tbody>
</table>
<p>This method will search for IP addresses in a ZServ&#8217;s address
list that either match or contain the given address, using the
wildcard expansions supported by
<a title="ZDStack.ZDSAccessList.IPAddress" class="reference internal" href="#ZDStack.ZDSAccessList.IPAddress"><tt class="xref docutils literal"><span class="pre">IPAddress</span></tt></a>.  This method does
not consider matching addresses found only in the global list
as matches.</p>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSAccessList.AddressList.search_global">
<tt class="descname">search_global</tt><big>(</big><em>*__args</em>, <em>**__kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSAccessList.AddressList.search_global" title="Permalink to this definition">¶</a></dt>
<dd><p>Searches for an address.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>address</em> (string) &#8211; an address to search for</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body">False if the address is not found, True or the reason
listed with the address if found.</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">boolean or string</td>
</tr>
</tbody>
</table>
<p>This method will search for IP addresses in the global address
list that either match or contain the given address, using the
wildcard expansions supported by
<a title="ZDStack.ZDSAccessList.IPAddress" class="reference internal" href="#ZDStack.ZDSAccessList.IPAddress"><tt class="xref docutils literal"><span class="pre">IPAddress</span></tt></a>.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="ZDStack.ZDSAccessList.Ban">
<em class="property">class </em><tt class="descclassname">ZDStack.ZDSAccessList.</tt><tt class="descname">Ban</tt><big>(</big><em>address_string</em>, <em>reason=None</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSAccessList.Ban" title="Permalink to this definition">¶</a></dt>
<dd><dl class="method">
<dt id="ZDStack.ZDSAccessList.Ban.render">
<tt class="descname">render</tt><big>(</big><big>)</big><a class="headerlink" href="#ZDStack.ZDSAccessList.Ban.render" title="Permalink to this definition">¶</a></dt>
<dd><p>Renders this Ban.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">string</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body">a string representation of the ban in ZDaemon banlist
format.  Unless saving into a zserv&#8217;s banlist file,
you probably just want to use the str() method on Ban
instances instead.</td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="ZDStack.ZDSAccessList.BanList">
<em class="property">class </em><tt class="descclassname">ZDStack.ZDSAccessList.</tt><tt class="descname">BanList</tt><big>(</big><em>dummy=False</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSAccessList.BanList" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="class">
<dt id="ZDStack.ZDSAccessList.IPAddress">
<em class="property">class </em><tt class="descclassname">ZDStack.ZDSAccessList.</tt><tt class="descname">IPAddress</tt><big>(</big><em>address_string</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSAccessList.IPAddress" title="Permalink to this definition">¶</a></dt>
<dd><p>IPAddress represents an IP address or IP addresses.</p>
<p>IPAddress supports 2 types of range expansions:</p>
<blockquote>
<ul class="simple">
<li>192.168.2.*:     Matches anything for &#8216;*&#8217;</li>
<li>192.168.2.17-34: Matches address from 17-34 inclusive</li>
</ul>
</blockquote>
<p>IPAddresses representing IP ranges can also be tested for
membership, for example:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">IPAddress</span><span class="p">(</span><span class="s">&#39;192.168.2.4&#39;</span><span class="p">)</span> <span class="ow">in</span> <span class="n">IPAddress</span><span class="p">(</span><span class="s">&#39;192.168.2.3-5&#39;</span><span class="p">)</span>
<span class="go">True</span>
</pre></div>
</div>
<dl class="method">
<dt id="ZDStack.ZDSAccessList.IPAddress.from_address">
<tt class="descname">from_address</tt><big>(</big><em>address</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSAccessList.IPAddress.from_address" title="Permalink to this definition">¶</a></dt>
<dd><p>Creates an object of the same type as this instance.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>address</em> (either string or int/long) &#8211; an IP address</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body">An object of the same type as this instance, with a
separate address.  This is most useful for
subclasses.</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSAccessList.IPAddress.max">
<tt class="descname">max</tt><a class="headerlink" href="#ZDStack.ZDSAccessList.IPAddress.max" title="Permalink to this definition">¶</a></dt>
<dd>The highest int/long this IPAddress represents.</dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSAccessList.IPAddress.min">
<tt class="descname">min</tt><a class="headerlink" href="#ZDStack.ZDSAccessList.IPAddress.min" title="Permalink to this definition">¶</a></dt>
<dd>The lowest int/long this IPAddress represents.</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSAccessList.IPAddress.render">
<tt class="descname">render</tt><big>(</big><big>)</big><a class="headerlink" href="#ZDStack.ZDSAccessList.IPAddress.render" title="Permalink to this definition">¶</a></dt>
<dd><p>Renders this IPAddress.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">string</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body">a nicely formatted string representing this
IPAddress, suitable for re-parsing or saving to a
file</td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

<dl class="exception">
<dt id="ZDStack.ZDSAccessList.MalformedIPAddressError">
<em class="property">exception </em><tt class="descclassname">ZDStack.ZDSAccessList.</tt><tt class="descname">MalformedIPAddressError</tt><big>(</big><em>address</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSAccessList.MalformedIPAddressError" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="class">
<dt id="ZDStack.ZDSAccessList.WhiteList">
<em class="property">class </em><tt class="descclassname">ZDStack.ZDSAccessList.</tt><tt class="descname">WhiteList</tt><big>(</big><em>dummy=False</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSAccessList.WhiteList" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="class">
<dt id="ZDStack.ZDSAccessList.WhiteListedAddress">
<em class="property">class </em><tt class="descclassname">ZDStack.ZDSAccessList.</tt><tt class="descname">WhiteListedAddress</tt><big>(</big><em>address_string</em>, <em>reason=None</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSAccessList.WhiteListedAddress" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="class">
<dt id="ZDStack.ZDSAccessList.ZDaemonBanList">
<em class="property">class </em><tt class="descclassname">ZDStack.ZDSAccessList.</tt><tt class="descname">ZDaemonBanList</tt><big>(</big><em>dummy=False</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSAccessList.ZDaemonBanList" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</div>
<div class="section" id="module-ZDStack.ZDSConfigParser">
<h2>ZDStack.ZDSConfigParser<a class="headerlink" href="#module-ZDStack.ZDSConfigParser" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="ZDStack.ZDSConfigParser.RawZDSConfigParser">
<em class="property">class </em><tt class="descclassname">ZDStack.ZDSConfigParser.</tt><tt class="descname">RawZDSConfigParser</tt><big>(</big><em>filename=None</em>, <em>dummy=False</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSConfigParser.RawZDSConfigParser" title="Permalink to this definition">¶</a></dt>
<dd><p>RawZDSConfigParser improves on ConfigParser.RawConfigParser.</p>
<p>The following improvements are made:</p>
<blockquote>
<ul class="simple">
<li>All operations are threadsafe.</li>
<li>the internal dict of defaults is never returned</li>
<li>get() and get*() methods can handle default arguments.</li>
<li>getdecimal(), getlist() and getpath() methods were added</li>
<li>section order is preserved</li>
<li>read/readfp were replaced by load and loadfp</li>
<li>reload/reloadfp/save methods were also added</li>
</ul>
</blockquote>
<p>Regarding get*() methods and defaults, passing &#8216;None&#8217; (or nothing)
as the &#8216;default&#8217; argument causes the &#8216;NoOptionError&#8217; to be raised
if an option is not found.  This is also the default behavior.</p>
<dl class="attribute">
<dt id="ZDStack.ZDSConfigParser.RawZDSConfigParser._section_list">
<tt class="descname">_section_list</tt><a class="headerlink" href="#ZDStack.ZDSConfigParser.RawZDSConfigParser._section_list" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A list of section names, used to keep sections in order when</tt></dt>
<dt>
<tt class="descname">writing the configuration to disk</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSConfigParser.RawZDSConfigParser.lock">
<tt class="descname">lock</tt><a class="headerlink" href="#ZDStack.ZDSConfigParser.RawZDSConfigParser.lock" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A Lock that must be acquired before using the ConfigParser</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSConfigParser.RawZDSConfigParser.dummy">
<tt class="descname">dummy</tt><a class="headerlink" href="#ZDStack.ZDSConfigParser.RawZDSConfigParser.dummy" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A boolean, whether or not the ConfigParser is a dummy and</tt></dt>
<dt>
<tt class="descname">therefore shouldn't perform checks on the underlying file</tt></dt>
<dd></dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSConfigParser.RawZDSConfigParser.add_section">
<tt class="descname">add_section</tt><big>(</big><em>*__args</em>, <em>**__kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSConfigParser.RawZDSConfigParser.add_section" title="Permalink to this definition">¶</a></dt>
<dd><p>Adds a section.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>section</em> (string) &#8211; the name of the new section</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSConfigParser.RawZDSConfigParser.clear">
<tt class="descname">clear</tt><big>(</big><em>*__args</em>, <em>**__kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSConfigParser.RawZDSConfigParser.clear" title="Permalink to this definition">¶</a></dt>
<dd>Removes all sections, including the DEFAULT section.</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSConfigParser.RawZDSConfigParser.defaults">
<tt class="descname">defaults</tt><big>(</big><em>*__args</em>, <em>**__kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSConfigParser.RawZDSConfigParser.defaults" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets a dict of options &amp; values from the DEFAULT section.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Returns:</th><td class="field-body">a dict of options &amp; values from the DEFAULT section</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">dict</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSConfigParser.RawZDSConfigParser.get">
<tt class="descname">get</tt><big>(</big><em>*__args</em>, <em>**__kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSConfigParser.RawZDSConfigParser.get" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets an option&#8217;s value.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><em>section</em> (string) &#8211; the name of the section in which to look for
the option</li>
<li><em>option</em> (string) &#8211; the name of the option whose value is to be
returned</li>
<li><em>default</em> &#8211; optional, a value to be returned if the option
if not found</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">string</p>
</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">the string value of the option if found.  If the
option is not found, but &#8216;default&#8217; is not None,
the value of the &#8216;default&#8217; argument will be returned.
Otherwise a NoOptionError is raised.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSConfigParser.RawZDSConfigParser.get_excluding_defaults">
<tt class="descname">get_excluding_defaults</tt><big>(</big><em>*__args</em>, <em>**__kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSConfigParser.RawZDSConfigParser.get_excluding_defaults" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets an option&#8217;s value.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><em>section</em> (string) &#8211; the name of the section in which to look for
the option</li>
<li><em>option</em> (string) &#8211; the name of the option whose value is to be
returned</li>
<li><em>default</em> &#8211; optional, a value to be returned if the option
if not found</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">string</p>
</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">the string value of the option if found.  If the
option is not found, but &#8216;default&#8217; is not None,
the value of the &#8216;default&#8217; argument will be returned.
Otherwise a NoOptionError is raised.  This method
also excludes the DEFAULT section.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSConfigParser.RawZDSConfigParser.get_if_true">
<tt class="descname">get_if_true</tt><big>(</big><em>*__args</em>, <em>**__kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSConfigParser.RawZDSConfigParser.get_if_true" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets an option&#8217;s value if it is defined and True.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><em>section</em> (string) &#8211; the name of the section in which to look for
the option</li>
<li><em>option</em> (string) &#8211; the name of the option to look for</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">the option&#8217;s value if it is defined and True.
Otherwise returns None.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSConfigParser.RawZDSConfigParser.get_if_valid">
<tt class="descname">get_if_valid</tt><big>(</big><em>*__args</em>, <em>**__kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSConfigParser.RawZDSConfigParser.get_if_valid" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets an option&#8217;s value if it is defined and non-False.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><em>section</em> (string) &#8211; the name of the section in which to look for
the option</li>
<li><em>option</em> (string) &#8211; the name of the option to look for</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">the option&#8217;s value if it is defined and non-False.
Otherwise returns None.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSConfigParser.RawZDSConfigParser.getboolean">
<tt class="descname">getboolean</tt><big>(</big><em>*__args</em>, <em>**__kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSConfigParser.RawZDSConfigParser.getboolean" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets an option&#8217;s value as a boolean.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><em>section</em> (string) &#8211; the name of the section in which to look for
the option</li>
<li><em>option</em> (string) &#8211; the name of the option whose value is to be
returned</li>
<li><em>default</em> &#8211; optional, a value to be returned if the option
if not found</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">boolean</p>
</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">the boolean value of the option if found.  If the
option is not found, but &#8216;default&#8217; is not None,
the value of the &#8216;default&#8217; argument will be returned.
Otherwise a NoOptionError is raised.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSConfigParser.RawZDSConfigParser.getdecimal">
<tt class="descname">getdecimal</tt><big>(</big><em>*__args</em>, <em>**__kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSConfigParser.RawZDSConfigParser.getdecimal" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets an option&#8217;s value as a Decimal.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><em>section</em> (string) &#8211; the name of the section in which to look for
the option</li>
<li><em>option</em> (string) &#8211; the name of the option whose value is to be
returned</li>
<li><em>default</em> &#8211; optional, a value to be returned if the option
if not found</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">Decimal</p>
</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">the Decimal value of the option if found.  If the
option is not found, but &#8216;default&#8217; is not None,
the value of the &#8216;default&#8217; argument will be returned.
Otherwise a NoOptionError is raised.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSConfigParser.RawZDSConfigParser.getfloat">
<tt class="descname">getfloat</tt><big>(</big><em>*__args</em>, <em>**__kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSConfigParser.RawZDSConfigParser.getfloat" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets an option&#8217;s value as a float.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><em>section</em> (string) &#8211; the name of the section in which to look for
the option</li>
<li><em>option</em> (string) &#8211; the name of the option whose value is to be
returned</li>
<li><em>default</em> &#8211; optional, a value to be returned if the option
if not found</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">float</p>
</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">the float value of the option if found.  If the
option is not found, but &#8216;default&#8217; is not None,
the value of the &#8216;default&#8217; argument will be returned.
Otherwise a NoOptionError is raised.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSConfigParser.RawZDSConfigParser.getint">
<tt class="descname">getint</tt><big>(</big><em>*__args</em>, <em>**__kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSConfigParser.RawZDSConfigParser.getint" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets an option&#8217;s value as an int.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><em>section</em> (string) &#8211; the name of the section in which to look for
the option</li>
<li><em>option</em> (string) &#8211; the name of the option whose value is to be
returned</li>
<li><em>default</em> &#8211; optional, a value to be returned if the option
if not found</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">int</p>
</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">the int value of the option if found.  If the
option is not found, but &#8216;default&#8217; is not None,
the value of the &#8216;default&#8217; argument will be returned.
Otherwise a NoOptionError is raised.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSConfigParser.RawZDSConfigParser.getlist">
<tt class="descname">getlist</tt><big>(</big><em>*__args</em>, <em>**__kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSConfigParser.RawZDSConfigParser.getlist" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets an option&#8217;s value as a list.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><em>section</em> (string) &#8211; the name of the section in which to look for
the option</li>
<li><em>option</em> (string) &#8211; the name of the option whose value is to be
returned</li>
<li><em>default</em> &#8211; optional, a value to be returned if the option
if not found</li>
<li><em>parse_func</em> (function) &#8211; a function used to parse the option&#8217;s value
into a list.  optional, the default is:
&#8216;lambda x: [y.strip() for y in x.split(&#8216;,&#8217;)]&#8217;</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">list</p>
</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">the parsed list value of the option if found.  If the
option is not found, but &#8216;default&#8217; is not None,
the value of the &#8216;default&#8217; argument will be returned.
Otherwise a NoOptionError is raised.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSConfigParser.RawZDSConfigParser.getpath">
<tt class="descname">getpath</tt><big>(</big><em>*__args</em>, <em>**__kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSConfigParser.RawZDSConfigParser.getpath" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets an option&#8217;s value as a resolved path.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><em>section</em> (string) &#8211; the name of the section in which to look for
the option</li>
<li><em>option</em> (string) &#8211; the name of the option whose value is to be
returned</li>
<li><em>default</em> &#8211; optional, a value to be returned if the option
if not found</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">string</p>
</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">the string value of the option if found.  If the
option is not found, but &#8216;default&#8217; is not None,
the value of the &#8216;default&#8217; argument will be returned.
Otherwise a NoOptionError is raised.  The value will
be passed through
os.path.abspath(os.path.expanduser(v)).</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSConfigParser.RawZDSConfigParser.has_option">
<tt class="descname">has_option</tt><big>(</big><em>*__args</em>, <em>**__kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSConfigParser.RawZDSConfigParser.has_option" title="Permalink to this definition">¶</a></dt>
<dd><p>Checks if a section contains a specified option.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><em>section</em> (string) &#8211; the name of the section to be checked</li>
<li><em>option</em> (string) &#8211; the option to check for</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">boolean</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSConfigParser.RawZDSConfigParser.has_section">
<tt class="descname">has_section</tt><big>(</big><em>*__args</em>, <em>**__kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSConfigParser.RawZDSConfigParser.has_section" title="Permalink to this definition">¶</a></dt>
<dd><p>Tests if a section exists or not.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>section</em> (string) &#8211; the name of the section to test for</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">boolean</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body">a boolean whether the section exists or not</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSConfigParser.RawZDSConfigParser.items">
<tt class="descname">items</tt><big>(</big><em>*__args</em>, <em>**__kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSConfigParser.RawZDSConfigParser.items" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets a section&#8217;s items.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>section</em> (string) &#8211; the name of the section whose items are to be
returned</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">list of 2-Tuples</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body">a list of a section&#8217;s options and values, i.e.
[(&#8216;option&#8217;, &#8216;value1&#8217;), (&#8216;option2&#8217;, &#8216;value2&#8217;)]</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSConfigParser.RawZDSConfigParser.options">
<tt class="descname">options</tt><big>(</big><em>*__args</em>, <em>**__kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSConfigParser.RawZDSConfigParser.options" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a section&#8217;s options.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>section</em> (string) &#8211; the name of the section whose options are to
be returned</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">list of strings</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body">a list of strings representing the names of the
options</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSConfigParser.RawZDSConfigParser.read">
<tt class="descname">read</tt><big>(</big><em>filenames</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSConfigParser.RawZDSConfigParser.read" title="Permalink to this definition">¶</a></dt>
<dd><p>Old &#8216;read&#8217; method from ConfigParser.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>filenames</em> (list of strings) &#8211; the names of the files to parse</td>
</tr>
</tbody>
</table>
<p>This method will raise an Exception if used, the
ZDSConfigParsers are designed to be used with one file only.
Typically the &#8220;read a bunch of files for data&#8221; method was only
useful when checking a prioritized list of possible config
files, but ZDStack already does this in __init__, so this
method has become useless.</p>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSConfigParser.RawZDSConfigParser.readfp">
<tt class="descname">readfp</tt><big>(</big><em>fp</em>, <em>filename=None</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSConfigParser.RawZDSConfigParser.readfp" title="Permalink to this definition">¶</a></dt>
<dd><p>Old &#8216;readfp&#8217; method from ConfigParser.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>fp</em> (file) &#8211; a file object whose contents are to be parsed</td>
</tr>
</tbody>
</table>
<p>For the same reasons &#8216;read&#8217; is useless, this method is also
useless and will also raise an Exception if used.</p>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSConfigParser.RawZDSConfigParser.remove_option">
<tt class="descname">remove_option</tt><big>(</big><em>*__args</em>, <em>**__kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSConfigParser.RawZDSConfigParser.remove_option" title="Permalink to this definition">¶</a></dt>
<dd><p>Removes an option from a section.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><em>section</em> (string) &#8211; the section from which to remove the option</li>
<li><em>option</em> (string) &#8211; the option to be removed</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">boolean</p>
</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">True if the option existed</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSConfigParser.RawZDSConfigParser.remove_section">
<tt class="descname">remove_section</tt><big>(</big><em>*__args</em>, <em>**__kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSConfigParser.RawZDSConfigParser.remove_section" title="Permalink to this definition">¶</a></dt>
<dd><p>Removes a section.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>section</em> (string) &#8211; the section to be removed</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">boolean</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body">True if the section existed</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSConfigParser.RawZDSConfigParser.sections">
<tt class="descname">sections</tt><big>(</big><em>*__args</em>, <em>**__kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSConfigParser.RawZDSConfigParser.sections" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets a list of section names.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Returns:</th><td class="field-body">a list of section names</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">a list of strings</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSConfigParser.RawZDSConfigParser.set">
<tt class="descname">set</tt><big>(</big><em>*__args</em>, <em>**__kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSConfigParser.RawZDSConfigParser.set" title="Permalink to this definition">¶</a></dt>
<dd><p>Sets a section&#8217;s option to &#8216;value&#8217;.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><em>section</em> (string) &#8211; the name of the section whose option&#8217;s value
is to be set</li>
<li><em>option</em> (string) &#8211; the option whose value is to be set</li>
<li><em>value</em> (string) &#8211; the new value of the option</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="ZDStack.ZDSConfigParser.SafeZDSConfigParser">
<em class="property">class </em><tt class="descclassname">ZDStack.ZDSConfigParser.</tt><tt class="descname">SafeZDSConfigParser</tt><big>(</big><em>defaults=None</em>, <em>dict_type=&lt;type 'dict'&gt;</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSConfigParser.SafeZDSConfigParser" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="class">
<dt id="ZDStack.ZDSConfigParser.ZDSConfigParser">
<em class="property">class </em><tt class="descclassname">ZDStack.ZDSConfigParser.</tt><tt class="descname">ZDSConfigParser</tt><big>(</big><em>filename=None</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSConfigParser.ZDSConfigParser" title="Permalink to this definition">¶</a></dt>
<dd><p>ZDSConfigParser is RawZDSConfigParser with magic interpolation.</p>
<dl class="attribute">
<dt id="ZDStack.ZDSConfigParser.ZDSConfigParser._section_list">
<tt class="descname">_section_list</tt><a class="headerlink" href="#ZDStack.ZDSConfigParser.ZDSConfigParser._section_list" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A list of section names, used to keep sections in order when</tt></dt>
<dt>
<tt class="descname">writing the configuration to disk</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSConfigParser.ZDSConfigParser.lock">
<tt class="descname">lock</tt><a class="headerlink" href="#ZDStack.ZDSConfigParser.ZDSConfigParser.lock" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A Lock that must be acquired before using the ConfigParser</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSConfigParser.ZDSConfigParser.dummy">
<tt class="descname">dummy</tt><a class="headerlink" href="#ZDStack.ZDSConfigParser.ZDSConfigParser.dummy" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A boolean, whether or not the ConfigParser is a dummy and</tt></dt>
<dt>
<tt class="descname">therefore shouldn't perform checks on the underlying file</tt></dt>
<dd></dd></dl>

<p>All interpolation is done with SafeConfigParser&#8217;s methods, so
interpolation shouldn&#8217;t get out of control.</p>
<dl class="method">
<dt id="ZDStack.ZDSConfigParser.ZDSConfigParser.get">
<tt class="descname">get</tt><big>(</big><em>*__args</em>, <em>**__kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSConfigParser.ZDSConfigParser.get" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets an option&#8217;s value without interpolation.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><em>section</em> (string) &#8211; the name of the section in which to look for
the option</li>
<li><em>option</em> (string) &#8211; the name of the option whose value is to be
returned</li>
<li><em>default</em> &#8211; optional, a value to be returned if the option
if not found</li>
<li><em>raw</em> (boolean) &#8211; whether or not to return the raw value of the
option, with no interpolation.  False by default.</li>
<li><em>vars</em> (dict) &#8211; additional values to be used during interpolation</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">string</p>
</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">the string value of the option if found.  If the
option is not found, but &#8216;default&#8217; is not None,
the value of the &#8216;default&#8217; argument will be returned.
Otherwise a NoOptionError is raised.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSConfigParser.ZDSConfigParser.get_raw">
<tt class="descname">get_raw</tt><big>(</big><em>*__args</em>, <em>**__kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSConfigParser.ZDSConfigParser.get_raw" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets an option&#8217;s value without interpolation.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><em>section</em> (string) &#8211; the name of the section in which to look for
the option</li>
<li><em>option</em> (string) &#8211; the name of the option whose value is to be
returned</li>
<li><em>default</em> &#8211; optional, a value to be returned if the option
if not found</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">string</p>
</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">the string value of the option if found.  If the
option is not found, but &#8216;default&#8217; is not None,
the value of the &#8216;default&#8217; argument will be returned.
Otherwise a NoOptionError is raised.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSConfigParser.ZDSConfigParser.items">
<tt class="descname">items</tt><big>(</big><em>*__args</em>, <em>**__kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSConfigParser.ZDSConfigParser.items" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a section&#8217;s items.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><em>section</em> (string) &#8211; the name of the section whose items are to be
returned</li>
<li><em>raw</em> (boolean) &#8211; whether or not to return the raw value of the
option, with no interpolation.  False by default.</li>
<li><em>vars</em> (dict) &#8211; additional values to be used during interpolation</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">list of 2-Tuples</p>
</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">a list of a section&#8217;s options and values, i.e.
[(&#8216;option&#8217;, &#8216;value1&#8217;), (&#8216;option2&#8217;, &#8216;value2&#8217;)]</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSConfigParser.ZDSConfigParser.set">
<tt class="descname">set</tt><big>(</big><em>*__args</em>, <em>**__kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSConfigParser.ZDSConfigParser.set" title="Permalink to this definition">¶</a></dt>
<dd><p>Sets a section&#8217;s option to &#8216;value&#8217;.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><em>section</em> (string) &#8211; the name of the section whose option&#8217;s value
is to be set</li>
<li><em>option</em> (string) &#8211; the option whose value is to be set</li>
<li><em>value</em> (string) &#8211; the new value of the option</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

</div>
<div class="section" id="module-ZDStack.ZDSDatabase">
<h2>ZDStack.ZDSDatabase<a class="headerlink" href="#module-ZDStack.ZDSDatabase" title="Permalink to this headline">¶</a></h2>
<dl class="function">
<dt id="ZDStack.ZDSDatabase.global_session">
<tt class="descclassname">ZDStack.ZDSDatabase.</tt><tt class="descname">global_session</tt><big>(</big><big>)</big><a class="headerlink" href="#ZDStack.ZDSDatabase.global_session" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets the global Session instance.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Returns:</th><td class="field-body">the global Session instance</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">Session</td>
</tr>
</tbody>
</table>
<p>This is a contextmanager that opens a transaction, committing or
rolling back as necessary.</p>
</dd></dl>

<dl class="function">
<dt id="ZDStack.ZDSDatabase.new_session">
<tt class="descclassname">ZDStack.ZDSDatabase.</tt><tt class="descname">new_session</tt><big>(</big><big>)</big><a class="headerlink" href="#ZDStack.ZDSDatabase.new_session" title="Permalink to this definition">¶</a></dt>
<dd><p>Creates a new Session instance.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Returns:</th><td class="field-body">a new Session instance</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">Session</td>
</tr>
</tbody>
</table>
<p>This is a contextmanager that opens a transaction, committing or
rolling back as necessary.</p>
</dd></dl>

<dl class="function">
<dt id="ZDStack.ZDSDatabase.requires_session">
<tt class="descclassname">ZDStack.ZDSDatabase.</tt><tt class="descname">requires_session</tt><big>(</big><em>func</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSDatabase.requires_session" title="Permalink to this definition">¶</a></dt>
<dd><p>A function decorator executing the function inside a session.</p>
<p>If no session is given with the keyword argument &#8216;session&#8217;, the
global session is used.</p>
</dd></dl>

</div>
<div class="section" id="module-ZDStack.ZDSEventHandler">
<h2>ZDStack.ZDSEventHandler<a class="headerlink" href="#module-ZDStack.ZDSEventHandler" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="ZDStack.ZDSEventHandler.BaseEventHandler">
<em class="property">class </em><tt class="descclassname">ZDStack.ZDSEventHandler.</tt><tt class="descname">BaseEventHandler</tt><a class="headerlink" href="#ZDStack.ZDSEventHandler.BaseEventHandler" title="Permalink to this definition">¶</a></dt>
<dd><p>The base EventHandler class.</p>
<p>An EventHandler maps event categories to handler functions.  These
functions use the signature &#8216;handler(event, zserv)&#8217;.</p>
<dl class="attribute">
<dt id="ZDStack.ZDSEventHandler.BaseEventHandler._event_categories_to_handlers">
<tt class="descname">_event_categories_to_handlers</tt><a class="headerlink" href="#ZDStack.ZDSEventHandler.BaseEventHandler._event_categories_to_handlers" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A dict mapping event categories to handler functions</tt></dt>
<dd></dd></dl>

<p>Don&#8217;t use _event_categories_to_handlers directly, instead use
get_handler() and set_handler()</p>
<dl class="method">
<dt id="ZDStack.ZDSEventHandler.BaseEventHandler.get_handler">
<tt class="descname">get_handler</tt><big>(</big><em>event_category</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSEventHandler.BaseEventHandler.get_handler" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a handler method for a given event_category.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>event_category</em> (string) &#8211; the category of an event for which to
return a handler.</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">function</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSEventHandler.BaseEventHandler.handle_error_event">
<tt class="descname">handle_error_event</tt><big>(</big><em>event</em>, <em>zserv=None</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSEventHandler.BaseEventHandler.handle_error_event" title="Permalink to this definition">¶</a></dt>
<dd><p>Handles an error event.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><em>event</em> (<a title="ZDStack.LogEvent.LogEvent" class="reference internal" href="#ZDStack.LogEvent.LogEvent"><tt class="xref docutils literal"><span class="pre">LogEvent</span></tt></a>) &#8211; the error event</li>
<li><em>zserv</em> (<a title="ZDStack.ZServ.ZServ" class="reference internal" href="#ZDStack.ZServ.ZServ"><tt class="xref docutils literal"><span class="pre">ZServ</span></tt></a>) &#8211; the event&#8217;s generating <a title="ZDStack.ZServ.ZServ" class="reference internal" href="#ZDStack.ZServ.ZServ"><tt class="xref docutils literal"><span class="pre">ZServ</span></tt></a></li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSEventHandler.BaseEventHandler.handle_unhandled_event">
<tt class="descname">handle_unhandled_event</tt><big>(</big><em>event</em>, <em>zserv=None</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSEventHandler.BaseEventHandler.handle_unhandled_event" title="Permalink to this definition">¶</a></dt>
<dd><p>Handles an unhandled event.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><em>event</em> (<a title="ZDStack.LogEvent.LogEvent" class="reference internal" href="#ZDStack.LogEvent.LogEvent"><tt class="xref docutils literal"><span class="pre">LogEvent</span></tt></a>) &#8211; the unhandled event</li>
<li><em>zserv</em> (<a title="ZDStack.ZServ.ZServ" class="reference internal" href="#ZDStack.ZServ.ZServ"><tt class="xref docutils literal"><span class="pre">ZServ</span></tt></a>) &#8211; the event&#8217;s generating <a title="ZDStack.ZServ.ZServ" class="reference internal" href="#ZDStack.ZServ.ZServ"><tt class="xref docutils literal"><span class="pre">ZServ</span></tt></a></li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSEventHandler.BaseEventHandler.set_handler">
<tt class="descname">set_handler</tt><big>(</big><em>event_category</em>, <em>handler</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSEventHandler.BaseEventHandler.set_handler" title="Permalink to this definition">¶</a></dt>
<dd><p>Sets the handler method for a certain event_category.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><em>event_category</em> (string) &#8211; the category of an event for which to
return a handler.</li>
<li><em>handler</em> (a function) &#8211; the event handler</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="ZDStack.ZDSEventHandler.ZServEventHandler">
<em class="property">class </em><tt class="descclassname">ZDStack.ZDSEventHandler.</tt><tt class="descname">ZServEventHandler</tt><a class="headerlink" href="#ZDStack.ZDSEventHandler.ZServEventHandler" title="Permalink to this definition">¶</a></dt>
<dd><dl class="method">
<dt id="ZDStack.ZDSEventHandler.ZServEventHandler.handle_connection_event">
<tt class="descname">handle_connection_event</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSEventHandler.ZServEventHandler.handle_connection_event" title="Permalink to this definition">¶</a></dt>
<dd><p>Handles a connection event.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><em>event</em> (<a title="ZDStack.LogEvent.LogEvent" class="reference internal" href="#ZDStack.LogEvent.LogEvent"><tt class="xref docutils literal"><span class="pre">LogEvent</span></tt></a>) &#8211; an event indicating that players should be sync&#8217;d</li>
<li><em>zserv</em> (<a title="ZDStack.ZServ.ZServ" class="reference internal" href="#ZDStack.ZServ.ZServ"><tt class="xref docutils literal"><span class="pre">ZServ</span></tt></a>) &#8211; the event&#8217;s generating <a title="ZDStack.ZServ.ZServ" class="reference internal" href="#ZDStack.ZServ.ZServ"><tt class="xref docutils literal"><span class="pre">ZServ</span></tt></a></li>
<li><em>session</em> (SQLAlchemy Session) &#8211; a database session</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSEventHandler.ZServEventHandler.handle_flag_event">
<tt class="descname">handle_flag_event</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSEventHandler.ZServEventHandler.handle_flag_event" title="Permalink to this definition">¶</a></dt>
<dd><p>Handles a flag_touch event.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><em>event</em> (<a title="ZDStack.LogEvent.LogEvent" class="reference internal" href="#ZDStack.LogEvent.LogEvent"><tt class="xref docutils literal"><span class="pre">LogEvent</span></tt></a>) &#8211; the flag event</li>
<li><em>zserv</em> (<a title="ZDStack.ZServ.ZServ" class="reference internal" href="#ZDStack.ZServ.ZServ"><tt class="xref docutils literal"><span class="pre">ZServ</span></tt></a>) &#8211; the event&#8217;s generating <a title="ZDStack.ZServ.ZServ" class="reference internal" href="#ZDStack.ZServ.ZServ"><tt class="xref docutils literal"><span class="pre">ZServ</span></tt></a></li>
<li><em>session</em> (SQLAlchemy Session) &#8211; a database session</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSEventHandler.ZServEventHandler.handle_frag_event">
<tt class="descname">handle_frag_event</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSEventHandler.ZServEventHandler.handle_frag_event" title="Permalink to this definition">¶</a></dt>
<dd><p>Handles a frag event.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><em>event</em> (<a title="ZDStack.LogEvent.LogEvent" class="reference internal" href="#ZDStack.LogEvent.LogEvent"><tt class="xref docutils literal"><span class="pre">LogEvent</span></tt></a>) &#8211; the frag event</li>
<li><em>zserv</em> (<a title="ZDStack.ZServ.ZServ" class="reference internal" href="#ZDStack.ZServ.ZServ"><tt class="xref docutils literal"><span class="pre">ZServ</span></tt></a>) &#8211; the event&#8217;s generating <a title="ZDStack.ZServ.ZServ" class="reference internal" href="#ZDStack.ZServ.ZServ"><tt class="xref docutils literal"><span class="pre">ZServ</span></tt></a></li>
<li><em>session</em> (SQLAlchemy Session) &#8211; a database session</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSEventHandler.ZServEventHandler.handle_game_join_event">
<tt class="descname">handle_game_join_event</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSEventHandler.ZServEventHandler.handle_game_join_event" title="Permalink to this definition">¶</a></dt>
<dd><p>Handles a game_join event.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><em>event</em> (<a title="ZDStack.LogEvent.LogEvent" class="reference internal" href="#ZDStack.LogEvent.LogEvent"><tt class="xref docutils literal"><span class="pre">LogEvent</span></tt></a>) &#8211; the game_join event</li>
<li><em>zserv</em> (<a title="ZDStack.ZServ.ZServ" class="reference internal" href="#ZDStack.ZServ.ZServ"><tt class="xref docutils literal"><span class="pre">ZServ</span></tt></a>) &#8211; the event&#8217;s generating <a title="ZDStack.ZServ.ZServ" class="reference internal" href="#ZDStack.ZServ.ZServ"><tt class="xref docutils literal"><span class="pre">ZServ</span></tt></a></li>
<li><em>session</em> (SQLAlchemy Session) &#8211; a database session</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSEventHandler.ZServEventHandler.handle_map_change_event">
<tt class="descname">handle_map_change_event</tt><big>(</big><em>event</em>, <em>zserv</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSEventHandler.ZServEventHandler.handle_map_change_event" title="Permalink to this definition">¶</a></dt>
<dd><p>Handles a map_change event.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><em>event</em> (<a title="ZDStack.LogEvent.LogEvent" class="reference internal" href="#ZDStack.LogEvent.LogEvent"><tt class="xref docutils literal"><span class="pre">LogEvent</span></tt></a>) &#8211; the map_change event</li>
<li><em>zserv</em> (<a title="ZDStack.ZServ.ZServ" class="reference internal" href="#ZDStack.ZServ.ZServ"><tt class="xref docutils literal"><span class="pre">ZServ</span></tt></a>) &#8211; the event&#8217;s generating <a title="ZDStack.ZServ.ZServ" class="reference internal" href="#ZDStack.ZServ.ZServ"><tt class="xref docutils literal"><span class="pre">ZServ</span></tt></a></li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSEventHandler.ZServEventHandler.handle_rcon_event">
<tt class="descname">handle_rcon_event</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSEventHandler.ZServEventHandler.handle_rcon_event" title="Permalink to this definition">¶</a></dt>
<dd><p>Handles an RCON-related event.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><em>event</em> (<a title="ZDStack.LogEvent.LogEvent" class="reference internal" href="#ZDStack.LogEvent.LogEvent"><tt class="xref docutils literal"><span class="pre">LogEvent</span></tt></a>) &#8211; the RCON event</li>
<li><em>zserv</em> (<a title="ZDStack.ZServ.ZServ" class="reference internal" href="#ZDStack.ZServ.ZServ"><tt class="xref docutils literal"><span class="pre">ZServ</span></tt></a>) &#8211; the event&#8217;s generating <a title="ZDStack.ZServ.ZServ" class="reference internal" href="#ZDStack.ZServ.ZServ"><tt class="xref docutils literal"><span class="pre">ZServ</span></tt></a></li>
<li><em>session</em> (SQLAlchemy Session) &#8211; a database session</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

</div>
<div class="section" id="module-ZDStack.ZDSFile">
<h2>ZDStack.ZDSFile<a class="headerlink" href="#module-ZDStack.ZDSFile" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="ZDStack.ZDSFile.SynchronizedFile">
<em class="property">class </em><tt class="descclassname">ZDStack.ZDSFile.</tt><tt class="descname">SynchronizedFile</tt><big>(</big><em>filename=None</em>, <em>dummy=False</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSFile.SynchronizedFile" title="Permalink to this definition">¶</a></dt>
<dd><p>SynchronizedFile is a threadsafe interface to an on-disk file.</p>
<dl class="attribute">
<dt id="ZDStack.ZDSFile.SynchronizedFile.lock">
<tt class="descname">lock</tt><a class="headerlink" href="#ZDStack.ZDSFile.SynchronizedFile.lock" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A Lock that must be acquired before using the SynchronizedFile</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSFile.SynchronizedFile.dummy">
<tt class="descname">dummy</tt><a class="headerlink" href="#ZDStack.ZDSFile.SynchronizedFile.dummy" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A boolean, whether or not the SynchronizedFile is a dummy and</tt></dt>
<dt>
<tt class="descname">therefore shouldn't perform checks on the underlying file</tt></dt>
<dd></dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSFile.SynchronizedFile.clear">
<tt class="descname">clear</tt><big>(</big><em>*__args</em>, <em>**__kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSFile.SynchronizedFile.clear" title="Permalink to this definition">¶</a></dt>
<dd>Here so subclasses can override.</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSFile.SynchronizedFile.load">
<tt class="descname">load</tt><big>(</big><em>*__args</em>, <em>**__kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSFile.SynchronizedFile.load" title="Permalink to this definition">¶</a></dt>
<dd>Loads data from the on-disk file.</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSFile.SynchronizedFile.loadfp">
<tt class="descname">loadfp</tt><big>(</big><em>*__args</em>, <em>**__kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSFile.SynchronizedFile.loadfp" title="Permalink to this definition">¶</a></dt>
<dd><p>Loads data from a file object.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>fobj</em> (file) &#8211; the file containing data</td>
</tr>
</tbody>
</table>
<p>This SynchronizedFile&#8217;s filename will also be set to the
resolved value of the file object&#8217;s .name attribute, so the
passed file object must have a .name attribute.</p>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSFile.SynchronizedFile.reload">
<tt class="descname">reload</tt><big>(</big><em>*__args</em>, <em>**__kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSFile.SynchronizedFile.reload" title="Permalink to this definition">¶</a></dt>
<dd>Reloads data from the on-disk file.</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSFile.SynchronizedFile.reloadfp">
<tt class="descname">reloadfp</tt><big>(</big><em>*__args</em>, <em>**__kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSFile.SynchronizedFile.reloadfp" title="Permalink to this definition">¶</a></dt>
<dd><p>Reloads data from a file object.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>fobj</em> (file) &#8211; the file containing data</td>
</tr>
</tbody>
</table>
<p>This SynchronizedFile&#8217;s filename will also be set to the
resolved value of the file object&#8217;s .name attribute, so the
passed file object must have a .name attribute.</p>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSFile.SynchronizedFile.save">
<tt class="descname">save</tt><big>(</big><em>*__args</em>, <em>**__kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSFile.SynchronizedFile.save" title="Permalink to this definition">¶</a></dt>
<dd><p>Writes this SynchronizedFile to disk.</p>
<p>The data that is written is the output of str(self), so
subclasses can override __str__.</p>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSFile.SynchronizedFile.set_file">
<tt class="descname">set_file</tt><big>(</big><em>*__args</em>, <em>**__kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSFile.SynchronizedFile.set_file" title="Permalink to this definition">¶</a></dt>
<dd><p>Sets the location of the on-disk file.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>filename</em> (string) &#8211; the new location of the on-disk file</td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

</div>
<div class="section" id="module-ZDStack.ZDSModels">
<h2>ZDStack.ZDSModels<a class="headerlink" href="#module-ZDStack.ZDSModels" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="ZDStack.ZDSModels.Alias">
<em class="property">class </em><tt class="descclassname">ZDStack.ZDSModels.</tt><tt class="descname">Alias</tt><big>(</big><em>**kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSModels.Alias" title="Permalink to this definition">¶</a></dt>
<dd><p>Alias represents a player&#8217;s alias.</p>
<dl class="attribute">
<dt id="ZDStack.ZDSModels.Alias.name">
<tt class="descname">name</tt><a class="headerlink" href="#ZDStack.ZDSModels.Alias.name" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A string representing the alias' name</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.Alias.ip_address">
<tt class="descname">ip_address</tt><a class="headerlink" href="#ZDStack.ZDSModels.Alias.ip_address" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A string representing the alias' IP address</tt></dt>
<dd></dd></dl>

<p>There is no way for ZDStack to determine player identity
completely on its own; an administrator must setup mappings between
StoredPlayers and Aliases.  However, player names and addresses
must be stored, so we assume that everything is an Alias and store
it as such.</p>
<dl class="attribute">
<dt id="ZDStack.ZDSModels.Alias.ip">
<tt class="descname">ip</tt><a class="headerlink" href="#ZDStack.ZDSModels.Alias.ip" title="Permalink to this definition">¶</a></dt>
<dd>Alias for ip_address</dd></dl>

</dd></dl>

<dl class="class">
<dt id="ZDStack.ZDSModels.FlagReturn">
<em class="property">class </em><tt class="descclassname">ZDStack.ZDSModels.</tt><tt class="descname">FlagReturn</tt><big>(</big><em>**kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSModels.FlagReturn" title="Permalink to this definition">¶</a></dt>
<dd><p>Represents a flag return.</p>
<dl class="attribute">
<dt id="ZDStack.ZDSModels.FlagReturn.id">
<tt class="descname">id</tt><a class="headerlink" href="#ZDStack.ZDSModels.FlagReturn.id" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">The database ID of this FlagReturn</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.FlagReturn.alias_id">
<tt class="descname">alias_id</tt><a class="headerlink" href="#ZDStack.ZDSModels.FlagReturn.alias_id" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">The database ID of this FlagReturn's alias</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.FlagReturn.round_id">
<tt class="descname">round_id</tt><a class="headerlink" href="#ZDStack.ZDSModels.FlagReturn.round_id" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">The database ID of this FlagReturn's Round</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.FlagReturn.timestamp">
<tt class="descname">timestamp</tt><a class="headerlink" href="#ZDStack.ZDSModels.FlagReturn.timestamp" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A datetime representing the time at which this FlagReturn</tt></dt>
<dt id="ZDStack.ZDSModels.FlagReturn.occurred">
<tt class="descname">occurred</tt><a class="headerlink" href="#ZDStack.ZDSModels.FlagReturn.occurred" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.FlagReturn.player_was_holding_flag">
<tt class="descname">player_was_holding_flag</tt><a class="headerlink" href="#ZDStack.ZDSModels.FlagReturn.player_was_holding_flag" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A boolean, whether or not the returning player was holding a</tt></dt>
<dt id="ZDStack.ZDSModels.FlagReturn.flag">
<tt class="descname">flag</tt><a class="headerlink" href="#ZDStack.ZDSModels.FlagReturn.flag" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.FlagReturn.player_team_color_name">
<tt class="descname">player_team_color_name</tt><a class="headerlink" href="#ZDStack.ZDSModels.FlagReturn.player_team_color_name" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">The name of player's TeamColor</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.FlagReturn.red_team_holding_flag">
<tt class="descname">red_team_holding_flag</tt><a class="headerlink" href="#ZDStack.ZDSModels.FlagReturn.red_team_holding_flag" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A boolean whether or not the red team was holding the flag</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.FlagReturn.blue_team_holding_flag">
<tt class="descname">blue_team_holding_flag</tt><a class="headerlink" href="#ZDStack.ZDSModels.FlagReturn.blue_team_holding_flag" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A boolean whether or not the blue team was holding the flag</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.FlagReturn.green_team_holding_flag">
<tt class="descname">green_team_holding_flag</tt><a class="headerlink" href="#ZDStack.ZDSModels.FlagReturn.green_team_holding_flag" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A boolean whether or not the green team was holding the flag</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.FlagReturn.white_team_holding_flag">
<tt class="descname">white_team_holding_flag</tt><a class="headerlink" href="#ZDStack.ZDSModels.FlagReturn.white_team_holding_flag" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A boolean whether or not the white team was holding the flag</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.FlagReturn.red_team_score">
<tt class="descname">red_team_score</tt><a class="headerlink" href="#ZDStack.ZDSModels.FlagReturn.red_team_score" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">An int representing the red team's score</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.FlagReturn.blue_team_score">
<tt class="descname">blue_team_score</tt><a class="headerlink" href="#ZDStack.ZDSModels.FlagReturn.blue_team_score" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">An int representing the blue team's score</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.FlagReturn.green_team_score">
<tt class="descname">green_team_score</tt><a class="headerlink" href="#ZDStack.ZDSModels.FlagReturn.green_team_score" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">An int representing the green team's score</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.FlagReturn.white_team_score">
<tt class="descname">white_team_score</tt><a class="headerlink" href="#ZDStack.ZDSModels.FlagReturn.white_team_score" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">An int representing the white team's score</tt></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="ZDStack.ZDSModels.FlagTouch">
<em class="property">class </em><tt class="descclassname">ZDStack.ZDSModels.</tt><tt class="descname">FlagTouch</tt><big>(</big><em>**kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSModels.FlagTouch" title="Permalink to this definition">¶</a></dt>
<dd><p>Represents a flag touch.</p>
<dl class="attribute">
<dt id="ZDStack.ZDSModels.FlagTouch.id">
<tt class="descname">id</tt><a class="headerlink" href="#ZDStack.ZDSModels.FlagTouch.id" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">The database ID of this FlagTouch</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.FlagTouch.alias_id">
<tt class="descname">alias_id</tt><a class="headerlink" href="#ZDStack.ZDSModels.FlagTouch.alias_id" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">The database ID of this FlagTouch's alias</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.FlagTouch.round_id">
<tt class="descname">round_id</tt><a class="headerlink" href="#ZDStack.ZDSModels.FlagTouch.round_id" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">The database ID of this FlagTouch's Round</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.FlagTouch.touch_time">
<tt class="descname">touch_time</tt><a class="headerlink" href="#ZDStack.ZDSModels.FlagTouch.touch_time" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A datetime representing the time at which this FlagTouch</tt></dt>
<dt id="ZDStack.ZDSModels.FlagTouch.began">
<tt class="descname">began</tt><a class="headerlink" href="#ZDStack.ZDSModels.FlagTouch.began" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.FlagTouch.loss_time">
<tt class="descname">loss_time</tt><a class="headerlink" href="#ZDStack.ZDSModels.FlagTouch.loss_time" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A datetime representing the time at which this FlagTouch</tt></dt>
<dt id="ZDStack.ZDSModels.FlagTouch.ended">
<tt class="descname">ended</tt><a class="headerlink" href="#ZDStack.ZDSModels.FlagTouch.ended" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.FlagTouch.was_picked">
<tt class="descname">was_picked</tt><a class="headerlink" href="#ZDStack.ZDSModels.FlagTouch.was_picked" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A boolean, whether or not the flag was picked up (as opposed to</tt></dt>
<dt>
<tt class="descname">taken from an enemy team's flag stand)</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.FlagTouch.resulted_in_score">
<tt class="descname">resulted_in_score</tt><a class="headerlink" href="#ZDStack.ZDSModels.FlagTouch.resulted_in_score" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A boolean, whether or not this FlagTouch ultimately resulted in</tt></dt>
<dt>
<tt class="descname">a capture</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.FlagTouch.player_team_color_name">
<tt class="descname">player_team_color_name</tt><a class="headerlink" href="#ZDStack.ZDSModels.FlagTouch.player_team_color_name" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">The name of player's TeamColor</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.FlagTouch.red_team_holding_flag">
<tt class="descname">red_team_holding_flag</tt><a class="headerlink" href="#ZDStack.ZDSModels.FlagTouch.red_team_holding_flag" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A boolean whether or not the red team was holding the flag</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.FlagTouch.blue_team_holding_flag">
<tt class="descname">blue_team_holding_flag</tt><a class="headerlink" href="#ZDStack.ZDSModels.FlagTouch.blue_team_holding_flag" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A boolean whether or not the blue team was holding the flag</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.FlagTouch.green_team_holding_flag">
<tt class="descname">green_team_holding_flag</tt><a class="headerlink" href="#ZDStack.ZDSModels.FlagTouch.green_team_holding_flag" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A boolean whether or not the green team was holding the flag</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.FlagTouch.white_team_holding_flag">
<tt class="descname">white_team_holding_flag</tt><a class="headerlink" href="#ZDStack.ZDSModels.FlagTouch.white_team_holding_flag" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A boolean whether or not the white team was holding the flag</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.FlagTouch.red_team_score">
<tt class="descname">red_team_score</tt><a class="headerlink" href="#ZDStack.ZDSModels.FlagTouch.red_team_score" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">An int representing the red team's score</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.FlagTouch.blue_team_score">
<tt class="descname">blue_team_score</tt><a class="headerlink" href="#ZDStack.ZDSModels.FlagTouch.blue_team_score" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">An int representing the blue team's score</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.FlagTouch.green_team_score">
<tt class="descname">green_team_score</tt><a class="headerlink" href="#ZDStack.ZDSModels.FlagTouch.green_team_score" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">An int representing the green team's score</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.FlagTouch.white_team_score">
<tt class="descname">white_team_score</tt><a class="headerlink" href="#ZDStack.ZDSModels.FlagTouch.white_team_score" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">An int representing the white team's score</tt></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="ZDStack.ZDSModels.Frag">
<em class="property">class </em><tt class="descclassname">ZDStack.ZDSModels.</tt><tt class="descname">Frag</tt><big>(</big><em>**kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSModels.Frag" title="Permalink to this definition">¶</a></dt>
<dd><p>Represents a frag.</p>
<dl class="attribute">
<dt id="ZDStack.ZDSModels.Frag.id">
<tt class="descname">id</tt><a class="headerlink" href="#ZDStack.ZDSModels.Frag.id" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">The database ID of this Frag</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.Frag.fragger_id">
<tt class="descname">fragger_id</tt><a class="headerlink" href="#ZDStack.ZDSModels.Frag.fragger_id" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">The database ID of this Frag's fragger (Alias)</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.Frag.fraggee_id">
<tt class="descname">fraggee_id</tt><a class="headerlink" href="#ZDStack.ZDSModels.Frag.fraggee_id" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">The database ID of this Frag's fraggee (Alias)</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.Frag.weapon_name">
<tt class="descname">weapon_name</tt><a class="headerlink" href="#ZDStack.ZDSModels.Frag.weapon_name" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">The name of this Frag's Weapon</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.Frag.round_id">
<tt class="descname">round_id</tt><a class="headerlink" href="#ZDStack.ZDSModels.Frag.round_id" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">The database ID of this Frag's Round</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.Frag.timestamp">
<tt class="descname">timestamp</tt><a class="headerlink" href="#ZDStack.ZDSModels.Frag.timestamp" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A datetime representing the time at which this Frag occurred</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.Frag.fragger_was_holding_flag">
<tt class="descname">fragger_was_holding_flag</tt><a class="headerlink" href="#ZDStack.ZDSModels.Frag.fragger_was_holding_flag" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A boolean, whether or not the fragger was holding a flag</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.Frag.fraggee_was_holding_flag">
<tt class="descname">fraggee_was_holding_flag</tt><a class="headerlink" href="#ZDStack.ZDSModels.Frag.fraggee_was_holding_flag" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A boolean, whether or not the fraggee was holding a flag</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.Frag.fragger_team_color_name">
<tt class="descname">fragger_team_color_name</tt><a class="headerlink" href="#ZDStack.ZDSModels.Frag.fragger_team_color_name" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">The name of fragger's TeamColor</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.Frag.fraggee_team_color_name">
<tt class="descname">fraggee_team_color_name</tt><a class="headerlink" href="#ZDStack.ZDSModels.Frag.fraggee_team_color_name" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">The name of fraggee's TeamColor</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.Frag.red_team_holding_flag">
<tt class="descname">red_team_holding_flag</tt><a class="headerlink" href="#ZDStack.ZDSModels.Frag.red_team_holding_flag" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A boolean whether or not the red team was holding the flag</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.Frag.blue_team_holding_flag">
<tt class="descname">blue_team_holding_flag</tt><a class="headerlink" href="#ZDStack.ZDSModels.Frag.blue_team_holding_flag" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A boolean whether or not the blue team was holding the flag</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.Frag.green_team_holding_flag">
<tt class="descname">green_team_holding_flag</tt><a class="headerlink" href="#ZDStack.ZDSModels.Frag.green_team_holding_flag" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A boolean whether or not the green team was holding the flag</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.Frag.white_team_holding_flag">
<tt class="descname">white_team_holding_flag</tt><a class="headerlink" href="#ZDStack.ZDSModels.Frag.white_team_holding_flag" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A boolean whether or not the white team was holding the flag</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.Frag.red_team_score">
<tt class="descname">red_team_score</tt><a class="headerlink" href="#ZDStack.ZDSModels.Frag.red_team_score" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">An int representing the red team's score</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.Frag.blue_team_score">
<tt class="descname">blue_team_score</tt><a class="headerlink" href="#ZDStack.ZDSModels.Frag.blue_team_score" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">An int representing the blue team's score</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.Frag.green_team_score">
<tt class="descname">green_team_score</tt><a class="headerlink" href="#ZDStack.ZDSModels.Frag.green_team_score" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">An int representing the green team's score</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.Frag.white_team_score">
<tt class="descname">white_team_score</tt><a class="headerlink" href="#ZDStack.ZDSModels.Frag.white_team_score" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">An int representing the white team's score</tt></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="ZDStack.ZDSModels.GameMode">
<em class="property">class </em><tt class="descclassname">ZDStack.ZDSModels.</tt><tt class="descname">GameMode</tt><big>(</big><em>name=None</em>, <em>has_teams=False</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSModels.GameMode" title="Permalink to this definition">¶</a></dt>
<dd><p>GameMode represents a game&#8217;s mode, i.e. TeamDM, CTF, etc.</p>
<dl class="attribute">
<dt id="ZDStack.ZDSModels.GameMode.name">
<tt class="descname">name</tt><a class="headerlink" href="#ZDStack.ZDSModels.GameMode.name" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A string representing this GameMode's name</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.GameMode.ports">
<tt class="descname">ports</tt><a class="headerlink" href="#ZDStack.ZDSModels.GameMode.ports" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">This GameMode's Port</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.GameMode.has_teams">
<tt class="descname">has_teams</tt><a class="headerlink" href="#ZDStack.ZDSModels.GameMode.has_teams" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A boolean, whether or not this GameMode employs teams</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.GameMode.rounds">
<tt class="descname">rounds</tt><a class="headerlink" href="#ZDStack.ZDSModels.GameMode.rounds" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A list of Rounds played using this GameMode</tt></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="ZDStack.ZDSModels.Map">
<em class="property">class </em><tt class="descclassname">ZDStack.ZDSModels.</tt><tt class="descname">Map</tt><big>(</big><em>wad_name=None</em>, <em>number=None</em>, <em>name=None</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSModels.Map" title="Permalink to this definition">¶</a></dt>
<dd><p>Map represents a map in a WAD.</p>
<dl class="attribute">
<dt id="ZDStack.ZDSModels.Map.id">
<tt class="descname">id</tt><a class="headerlink" href="#ZDStack.ZDSModels.Map.id" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">The database ID of this Map</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.Map.wad">
<tt class="descname">wad</tt><a class="headerlink" href="#ZDStack.ZDSModels.Map.wad" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">The containing WAD</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.Map.number">
<tt class="descname">number</tt><a class="headerlink" href="#ZDStack.ZDSModels.Map.number" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">An int representing the number of this Map in the containing</tt></dt>
<dt id="ZDStack.ZDSModels.Map.WAD">
<tt class="descname">WAD</tt><a class="headerlink" href="#ZDStack.ZDSModels.Map.WAD" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.Map.name">
<tt class="descname">name</tt><a class="headerlink" href="#ZDStack.ZDSModels.Map.name" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A string representing the name of this Map</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.Map.rounds">
<tt class="descname">rounds</tt><a class="headerlink" href="#ZDStack.ZDSModels.Map.rounds" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A list of Rounds played on this Map</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.Map.short_name">
<tt class="descname">short_name</tt><a class="headerlink" href="#ZDStack.ZDSModels.Map.short_name" title="Permalink to this definition">¶</a></dt>
<dd><p>The shortname of a map.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">unicode</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body">the short-hand name of a map.  Maps have a history of
shorthand names, i.e. D5M1, E2M1, ZDCTF04, ODA02,
etc.  This method attempts to figure these out for
the given map.</td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="ZDStack.ZDSModels.Port">
<em class="property">class </em><tt class="descclassname">ZDStack.ZDSModels.</tt><tt class="descname">Port</tt><big>(</big><em>name=None</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSModels.Port" title="Permalink to this definition">¶</a></dt>
<dd><p>Port represents a Doom source port.</p>
<dl class="attribute">
<dt id="ZDStack.ZDSModels.Port.name">
<tt class="descname">name</tt><a class="headerlink" href="#ZDStack.ZDSModels.Port.name" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A string representing the name of this Port</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.Port.game_modes">
<tt class="descname">game_modes</tt><a class="headerlink" href="#ZDStack.ZDSModels.Port.game_modes" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A list of this Port's GameModes</tt></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="ZDStack.ZDSModels.RCONAccess">
<em class="property">class </em><tt class="descclassname">ZDStack.ZDSModels.</tt><tt class="descname">RCONAccess</tt><big>(</big><em>**kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSModels.RCONAccess" title="Permalink to this definition">¶</a></dt>
<dd><p>Represents an RCON access.</p>
<dl class="attribute">
<dt id="ZDStack.ZDSModels.RCONAccess.id">
<tt class="descname">id</tt><a class="headerlink" href="#ZDStack.ZDSModels.RCONAccess.id" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">The database ID of this RCON access</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.RCONAccess.alias_id">
<tt class="descname">alias_id</tt><a class="headerlink" href="#ZDStack.ZDSModels.RCONAccess.alias_id" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">The database ID of this RCON access's alias</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.RCONAccess.round_id">
<tt class="descname">round_id</tt><a class="headerlink" href="#ZDStack.ZDSModels.RCONAccess.round_id" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">The database ID of this RCON access's Round</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.RCONAccess.timestamp">
<tt class="descname">timestamp</tt><a class="headerlink" href="#ZDStack.ZDSModels.RCONAccess.timestamp" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A datetime representing the time at which this RCON access</tt></dt>
<dt id="ZDStack.ZDSModels.RCONAccess.occurred">
<tt class="descname">occurred</tt><a class="headerlink" href="#ZDStack.ZDSModels.RCONAccess.occurred" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="ZDStack.ZDSModels.RCONAction">
<em class="property">class </em><tt class="descclassname">ZDStack.ZDSModels.</tt><tt class="descname">RCONAction</tt><big>(</big><em>**kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSModels.RCONAction" title="Permalink to this definition">¶</a></dt>
<dd><p>Represents an RCON action.</p>
<dl class="attribute">
<dt id="ZDStack.ZDSModels.RCONAction.id">
<tt class="descname">id</tt><a class="headerlink" href="#ZDStack.ZDSModels.RCONAction.id" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">The database ID of this RCON action</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.RCONAction.alias_id">
<tt class="descname">alias_id</tt><a class="headerlink" href="#ZDStack.ZDSModels.RCONAction.alias_id" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">The database ID of this RCON action's alias</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.RCONAction.round_id">
<tt class="descname">round_id</tt><a class="headerlink" href="#ZDStack.ZDSModels.RCONAction.round_id" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">The database ID of this RCON action's Round</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.RCONAction.timestamp">
<tt class="descname">timestamp</tt><a class="headerlink" href="#ZDStack.ZDSModels.RCONAction.timestamp" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A datetime representing the time at which this RCON action</tt></dt>
<dt id="ZDStack.ZDSModels.RCONAction.occurred">
<tt class="descname">occurred</tt><a class="headerlink" href="#ZDStack.ZDSModels.RCONAction.occurred" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.RCONAction.action">
<tt class="descname">action</tt><a class="headerlink" href="#ZDStack.ZDSModels.RCONAction.action" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A string representing the name of the RCON action</tt></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="ZDStack.ZDSModels.RCONDenial">
<em class="property">class </em><tt class="descclassname">ZDStack.ZDSModels.</tt><tt class="descname">RCONDenial</tt><big>(</big><em>**kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSModels.RCONDenial" title="Permalink to this definition">¶</a></dt>
<dd><p>Represents an RCON denial.</p>
<dl class="attribute">
<dt id="ZDStack.ZDSModels.RCONDenial.id">
<tt class="descname">id</tt><a class="headerlink" href="#ZDStack.ZDSModels.RCONDenial.id" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">The database ID of this RCON denial</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.RCONDenial.alias_id">
<tt class="descname">alias_id</tt><a class="headerlink" href="#ZDStack.ZDSModels.RCONDenial.alias_id" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">The database ID of this RCON denial's alias</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.RCONDenial.round_id">
<tt class="descname">round_id</tt><a class="headerlink" href="#ZDStack.ZDSModels.RCONDenial.round_id" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">The database ID of this RCON denial's Round</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.RCONDenial.timestamp">
<tt class="descname">timestamp</tt><a class="headerlink" href="#ZDStack.ZDSModels.RCONDenial.timestamp" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A datetime representing the time at which this RCON denial</tt></dt>
<dt id="ZDStack.ZDSModels.RCONDenial.occurred">
<tt class="descname">occurred</tt><a class="headerlink" href="#ZDStack.ZDSModels.RCONDenial.occurred" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="ZDStack.ZDSModels.Round">
<em class="property">class </em><tt class="descclassname">ZDStack.ZDSModels.</tt><tt class="descname">Round</tt><big>(</big><em>game_mode_name=None</em>, <em>map_id=None</em>, <em>start_time=None</em>, <em>end_time=None</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSModels.Round" title="Permalink to this definition">¶</a></dt>
<dd><p>A Round represents a single round of play.</p>
<dl class="attribute">
<dt id="ZDStack.ZDSModels.Round.id">
<tt class="descname">id</tt><a class="headerlink" href="#ZDStack.ZDSModels.Round.id" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">The database ID of this Round</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.Round.game_mode_name">
<tt class="descname">game_mode_name</tt><a class="headerlink" href="#ZDStack.ZDSModels.Round.game_mode_name" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">The name of this Round's GameMode</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.Round.map_id">
<tt class="descname">map_id</tt><a class="headerlink" href="#ZDStack.ZDSModels.Round.map_id" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">The ID of this Round's Map</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.Round.start_time">
<tt class="descname">start_time</tt><a class="headerlink" href="#ZDStack.ZDSModels.Round.start_time" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A datetime representing the start of this Round</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.Round.players">
<tt class="descname">players</tt><a class="headerlink" href="#ZDStack.ZDSModels.Round.players" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A list of this Round's Aliases</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.Round.frags">
<tt class="descname">frags</tt><a class="headerlink" href="#ZDStack.ZDSModels.Round.frags" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A list of this Round's Frags</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.Round.flag_touches">
<tt class="descname">flag_touches</tt><a class="headerlink" href="#ZDStack.ZDSModels.Round.flag_touches" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A list of this Round's FlagTouches</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.Round.flag_returns">
<tt class="descname">flag_returns</tt><a class="headerlink" href="#ZDStack.ZDSModels.Round.flag_returns" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A list of this Round's FlagReturns</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.Round.rcon_accesses">
<tt class="descname">rcon_accesses</tt><a class="headerlink" href="#ZDStack.ZDSModels.Round.rcon_accesses" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A list of this Round's RCONAccesses</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.Round.rcon_denials">
<tt class="descname">rcon_denials</tt><a class="headerlink" href="#ZDStack.ZDSModels.Round.rcon_denials" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A list of this Round's RCONDenials</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.Round.rcon_actions">
<tt class="descname">rcon_actions</tt><a class="headerlink" href="#ZDStack.ZDSModels.Round.rcon_actions" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A list of this Round's RCONActions</tt></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="ZDStack.ZDSModels.RoundsAndAliases">
<em class="property">class </em><tt class="descclassname">ZDStack.ZDSModels.</tt><tt class="descname">RoundsAndAliases</tt><a class="headerlink" href="#ZDStack.ZDSModels.RoundsAndAliases" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="class">
<dt id="ZDStack.ZDSModels.StoredPlayer">
<em class="property">class </em><tt class="descclassname">ZDStack.ZDSModels.</tt><tt class="descname">StoredPlayer</tt><big>(</big><em>name=None</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSModels.StoredPlayer" title="Permalink to this definition">¶</a></dt>
<dd><p>Represents a player.</p>
<dl class="attribute">
<dt id="ZDStack.ZDSModels.StoredPlayer.name">
<tt class="descname">name</tt><a class="headerlink" href="#ZDStack.ZDSModels.StoredPlayer.name" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A string representing the name of this StoredPlayer</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.StoredPlayer.aliases">
<tt class="descname">aliases</tt><a class="headerlink" href="#ZDStack.ZDSModels.StoredPlayer.aliases" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A list of this StoredPlayer's Aliases</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.StoredPlayer.deaths">
<tt class="descname">deaths</tt><a class="headerlink" href="#ZDStack.ZDSModels.StoredPlayer.deaths" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.StoredPlayer.flag_captures">
<tt class="descname">flag_captures</tt><a class="headerlink" href="#ZDStack.ZDSModels.StoredPlayer.flag_captures" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.StoredPlayer.flag_returns">
<tt class="descname">flag_returns</tt><a class="headerlink" href="#ZDStack.ZDSModels.StoredPlayer.flag_returns" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.StoredPlayer.flag_touches">
<tt class="descname">flag_touches</tt><a class="headerlink" href="#ZDStack.ZDSModels.StoredPlayer.flag_touches" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.StoredPlayer.frags">
<tt class="descname">frags</tt><a class="headerlink" href="#ZDStack.ZDSModels.StoredPlayer.frags" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.StoredPlayer.rcon_accesses">
<tt class="descname">rcon_accesses</tt><a class="headerlink" href="#ZDStack.ZDSModels.StoredPlayer.rcon_accesses" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.StoredPlayer.rcon_actions">
<tt class="descname">rcon_actions</tt><a class="headerlink" href="#ZDStack.ZDSModels.StoredPlayer.rcon_actions" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.StoredPlayer.rcon_denials">
<tt class="descname">rcon_denials</tt><a class="headerlink" href="#ZDStack.ZDSModels.StoredPlayer.rcon_denials" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.StoredPlayer.rounds">
<tt class="descname">rounds</tt><a class="headerlink" href="#ZDStack.ZDSModels.StoredPlayer.rounds" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.StoredPlayer.suicides">
<tt class="descname">suicides</tt><a class="headerlink" href="#ZDStack.ZDSModels.StoredPlayer.suicides" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="ZDStack.ZDSModels.TeamColor">
<em class="property">class </em><tt class="descclassname">ZDStack.ZDSModels.</tt><tt class="descname">TeamColor</tt><big>(</big><em>color=None</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSModels.TeamColor" title="Permalink to this definition">¶</a></dt>
<dd><p>TeamColor represents a team&#8217;s color.</p>
<dl class="attribute">
<dt id="ZDStack.ZDSModels.TeamColor.color">
<tt class="descname">color</tt><a class="headerlink" href="#ZDStack.ZDSModels.TeamColor.color" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A string representing the team's color</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.TeamColor.frags">
<tt class="descname">frags</tt><a class="headerlink" href="#ZDStack.ZDSModels.TeamColor.frags" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A list of this team color's Frags</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.TeamColor.deaths">
<tt class="descname">deaths</tt><a class="headerlink" href="#ZDStack.ZDSModels.TeamColor.deaths" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A list of this team color's Deaths (Frags)</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.TeamColor.flag_touches">
<tt class="descname">flag_touches</tt><a class="headerlink" href="#ZDStack.ZDSModels.TeamColor.flag_touches" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A list of this team color's FlagTouches</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.TeamColor.flag_returns">
<tt class="descname">flag_returns</tt><a class="headerlink" href="#ZDStack.ZDSModels.TeamColor.flag_returns" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A list of this team color's FlagReturns</tt></dt>
<dd></dd></dl>

<p>Teams can be much more than just colors, for instance, it&#8217;s
possible for an IDL &#8216;team&#8217; to play different rounds as different
using different &#8216;team colors&#8217;.  So we simply store the team&#8217;s color
and require the administrator to create their own mapping between
whatever they think a &#8216;team&#8217; is, and that team&#8217;s color in the
round.</p>
</dd></dl>

<dl class="class">
<dt id="ZDStack.ZDSModels.Wad">
<em class="property">class </em><tt class="descclassname">ZDStack.ZDSModels.</tt><tt class="descname">Wad</tt><big>(</big><em>name=None</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSModels.Wad" title="Permalink to this definition">¶</a></dt>
<dd><p>Wad represents a WAD file.</p>
<dl class="attribute">
<dt id="ZDStack.ZDSModels.Wad.name">
<tt class="descname">name</tt><a class="headerlink" href="#ZDStack.ZDSModels.Wad.name" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A string representing the name of the wad.</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.Wad.prefix">
<tt class="descname">prefix</tt><a class="headerlink" href="#ZDStack.ZDSModels.Wad.prefix" title="Permalink to this definition">¶</a></dt>
<dd><p>The prefix of this WAD.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">unicode</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body">the short name of the WAD.  WADs have history of
prefixes assigned to them, i.e. ZDCTF, this method
attempts to figure these prefixes out for the given
WAD.</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.Wad.short_name">
<tt class="descname">short_name</tt><a class="headerlink" href="#ZDStack.ZDSModels.Wad.short_name" title="Permalink to this definition">¶</a></dt>
<dd><p>The short name of this WAD.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">unicode</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body">the short name of the WAD.  WADs have history of
having their names shortened, i.e. ZDCTF or EpicCTF,
this method attempts to figure these short-hand names
out for the given WAD.</td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="ZDStack.ZDSModels.Weapon">
<em class="property">class </em><tt class="descclassname">ZDStack.ZDSModels.</tt><tt class="descname">Weapon</tt><big>(</big><em>name=None</em>, <em>is_suicide=None</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSModels.Weapon" title="Permalink to this definition">¶</a></dt>
<dd><p>Weapon represents something that kills players.</p>
<dl class="attribute">
<dt id="ZDStack.ZDSModels.Weapon.name">
<tt class="descname">name</tt><a class="headerlink" href="#ZDStack.ZDSModels.Weapon.name" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A string representing the name of the Weapon</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSModels.Weapon.is_suicide">
<tt class="descname">is_suicide</tt><a class="headerlink" href="#ZDStack.ZDSModels.Weapon.is_suicide" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A boolean, whether or not the Weapon is a suicide</tt></dt>
<dd></dd></dl>

</dd></dl>

</div>
<div class="section" id="module-ZDStack.ZDSPlayersList">
<h2>ZDStack.ZDSPlayersList<a class="headerlink" href="#module-ZDStack.ZDSPlayersList" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="ZDStack.ZDSPlayersList.PlayersList">
<em class="property">class </em><tt class="descclassname">ZDStack.ZDSPlayersList.</tt><tt class="descname">PlayersList</tt><big>(</big><em>zserv</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSPlayersList.PlayersList" title="Permalink to this definition">¶</a></dt>
<dd><p>PlayersList is a threadsafe list of players.</p>
<dl class="attribute">
<dt id="ZDStack.ZDSPlayersList.PlayersList.zserv">
<tt class="descname">zserv</tt><a class="headerlink" href="#ZDStack.ZDSPlayersList.PlayersList.zserv" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">This PlayersList's containing ZServ instance.</tt></dt>
<dd></dd></dl>

<p>It is possible that many threads will try and modify the players
list at the same time, with unpredictible results.  PlayersList
synchronizes access to its internal list of players so that any
addition or removal of players is done atomically, and so that the
internal list doesn&#8217;t change during these operations.</p>
<dl class="method">
<dt id="ZDStack.ZDSPlayersList.PlayersList.check_bans">
<tt class="descname">check_bans</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSPlayersList.PlayersList.check_bans" title="Permalink to this definition">¶</a></dt>
<dd><p>Kicks banned players.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>session</em> (SQLAlchemy Session) &#8211; a database session</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSPlayersList.PlayersList.clear">
<tt class="descname">clear</tt><big>(</big><em>*__args</em>, <em>**__kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSPlayersList.PlayersList.clear" title="Permalink to this definition">¶</a></dt>
<dd>Clears the list of players.</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSPlayersList.PlayersList.get">
<tt class="descname">get</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSPlayersList.PlayersList.get" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns an Alias instance.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><em>name</em> (string) &#8211; the name of the player to return</li>
<li><em>ip_address_and_port</em> (tuple, i.e. (&#8216;ip_address&#8217;, port)) &#8211; the IP address and port of the
player to return</li>
<li><em>sync</em> &#8211; a boolean, if True this method performs a sync and
reattempts to lookup a player if it is not
initially found; True by default</li>
<li><em>session</em> (SQLAlchemy Session) &#8211; a database session</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">Alias</p>
</td>
</tr>
</tbody>
</table>
<p>Either name or ip_address_and_port is optional, but at least
one must be given.  Note that only giving name can potentially
return the wrong player, as multiple players can have the same
name.</p>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSPlayersList.PlayersList.get_first_matching_player">
<tt class="descname">get_first_matching_player</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSPlayersList.PlayersList.get_first_matching_player" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the player whose name matches a list of names.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><em>possible_player_names</em> (a list of strings) &#8211; the player names to check</li>
<li><em>session</em> (an SQLAlchemy Session) &#8211; an SQLAlchemy Session</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">Player</p>
</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">the player whose name matches the earliest name in
&#8216;possible_player_names&#8217;</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSPlayersList.PlayersList.sync">
<tt class="descname">sync</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSPlayersList.PlayersList.sync" title="Permalink to this definition">¶</a></dt>
<dd><p>Syncs the internal players list with the running zserv.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><em>zplayers</em> (a list of dicts) &#8211; optional, the output from
self.zserv.zplayers()</li>
<li><em>sleep</em> (int or Decimal or float) &#8211; optional, the amount of time to sleep before
manually acquiring the list of players from
self.zserv; defaults to None, and is only used
when zplayers is None</li>
<li><em>check_bans</em> (boolean) &#8211; whether or not to check the sync&#8217;d list of
players for banned players, and kick them</li>
<li><em>session</em> (SQLAlchemy Session) &#8211; a database session</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

</div>
<div class="section" id="module-ZDStack.ZDSRegexps">
<h2>ZDStack.ZDSRegexps<a class="headerlink" href="#module-ZDStack.ZDSRegexps" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="ZDStack.ZDSRegexps.Regexp">
<em class="property">class </em><tt class="descclassname">ZDStack.ZDSRegexps.</tt><tt class="descname">Regexp</tt><big>(</big><em>regexp</em>, <em>category</em>, <em>event_type</em>, <em>prefix=None</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSRegexps.Regexp" title="Permalink to this definition">¶</a></dt>
<dd><p>A Regexp is a wrapper around a raw regular expression string.</p>
<p>Regexp is useful because it allows prefixes, and the ability to
create an Event from a line.</p>
<dl class="attribute">
<dt id="ZDStack.ZDSRegexps.Regexp.category">
<tt class="descname">category</tt><a class="headerlink" href="#ZDStack.ZDSRegexps.Regexp.category" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A string representing the category of event this regexp matches</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSRegexps.Regexp.event_type">
<tt class="descname">event_type</tt><a class="headerlink" href="#ZDStack.ZDSRegexps.Regexp.event_type" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A string representing the type of event this string matches</tt></dt>
<dd></dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSRegexps.Regexp.get_event">
<tt class="descname">get_event</tt><big>(</big><em>s</em>, <em>now=None</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSRegexps.Regexp.get_event" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets an event.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><em>s</em> (string) &#8211; a string from which to extract an event.</li>
<li><em>now</em> (datetime.datetime) &#8211; optional, the time the string was generated;
defaults to &#8216;datetime.datetime.now()&#8217;</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">LogEvent</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSRegexps.Regexp.match">
<tt class="descname">match</tt><big>(</big><em>s</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSRegexps.Regexp.match" title="Permalink to this definition">¶</a></dt>
<dd><p>Tests whether a string matches this Regexp.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>s</em> (string) &#8211; a string to match</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">boolean or dict</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body">A dict of group names and values if the string
matches, False otherwise</td>
</tr>
</tbody>
</table>
<p>This method actually uses &#8216;.search()&#8217;, so be wary.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="ZDStack.ZDSRegexps.ServerRegexp">
<em class="property">class </em><tt class="descclassname">ZDStack.ZDSRegexps.</tt><tt class="descname">ServerRegexp</tt><big>(</big><em>regexp</em>, <em>category</em>, <em>event_type</em>, <em>requires_prefix=True</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSRegexps.ServerRegexp" title="Permalink to this definition">¶</a></dt>
<dd><p>ServerRegexp matches lines from a zserv&#8217;s log output.</p>
<dl class="attribute">
<dt id="ZDStack.ZDSRegexps.ServerRegexp.category">
<tt class="descname">category</tt><a class="headerlink" href="#ZDStack.ZDSRegexps.ServerRegexp.category" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A string representing the category of event this regexp matches</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSRegexps.ServerRegexp.event_type">
<tt class="descname">event_type</tt><a class="headerlink" href="#ZDStack.ZDSRegexps.ServerRegexp.event_type" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A string representing the type of event this string matches</tt></dt>
<dd></dd></dl>

</dd></dl>

<dl class="function">
<dt id="ZDStack.ZDSRegexps.get_client_regexps">
<tt class="descclassname">ZDStack.ZDSRegexps.</tt><tt class="descname">get_client_regexps</tt><big>(</big><big>)</big><a class="headerlink" href="#ZDStack.ZDSRegexps.get_client_regexps" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="ZDStack.ZDSRegexps.get_possible_player_names">
<tt class="descclassname">ZDStack.ZDSRegexps.</tt><tt class="descname">get_possible_player_names</tt><big>(</big><em>s</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSRegexps.get_possible_player_names" title="Permalink to this definition">¶</a></dt>
<dd><p>Parses a message, extracting potential names of the sender.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>s</em> (string) &#8211; the message to parse</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">tuple</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body">([&#8216;potential&#8217;, &#8216;names&#8217;, &#8216;of&#8217;, &#8216;the&#8217;, &#8216;sender&#8217;,
&#8216;message without prefix&#8217;)</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="ZDStack.ZDSRegexps.get_server_regexps">
<tt class="descclassname">ZDStack.ZDSRegexps.</tt><tt class="descname">get_server_regexps</tt><big>(</big><big>)</big><a class="headerlink" href="#ZDStack.ZDSRegexps.get_server_regexps" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</div>
<div class="section" id="module-ZDStack.ZDSTask">
<h2>ZDStack.ZDSTask<a class="headerlink" href="#module-ZDStack.ZDSTask" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="ZDStack.ZDSTask.Task">
<em class="property">class </em><tt class="descclassname">ZDStack.ZDSTask.</tt><tt class="descname">Task</tt><big>(</big><em>func</em>, <em>args=None</em>, <em>kwargs=None</em>, <em>name=None</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSTask.Task" title="Permalink to this definition">¶</a></dt>
<dd><p>Represents a Task to be performed.</p>
<dl class="attribute">
<dt id="ZDStack.ZDSTask.Task.func">
<tt class="descname">func</tt><a class="headerlink" href="#ZDStack.ZDSTask.Task.func" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">The function this Task will call when it is performed</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSTask.Task.args">
<tt class="descname">args</tt><a class="headerlink" href="#ZDStack.ZDSTask.Task.args" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A list of positional arguments to pass to func</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSTask.Task.kwargs">
<tt class="descname">kwargs</tt><a class="headerlink" href="#ZDStack.ZDSTask.Task.kwargs" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A list of keyword arguments to pass to func</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSTask.Task.name">
<tt class="descname">name</tt><a class="headerlink" href="#ZDStack.ZDSTask.Task.name" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">The (optional) name of this task, default 'Generic'</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSTask.Task.is_complete">
<tt class="descname">is_complete</tt><a class="headerlink" href="#ZDStack.ZDSTask.Task.is_complete" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">An Event that is set when this task is complete</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZDSTask.Task.output">
<tt class="descname">output</tt><a class="headerlink" href="#ZDStack.ZDSTask.Task.output" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">The return value (if any) of func after it's called, starts off</tt></dt>
<dt>
<tt class="descname">as None, and may remain so</tt></dt>
<dd></dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSTask.Task.perform">
<tt class="descname">perform</tt><big>(</big><em>input_queue</em>, <em>output_queue=None</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSTask.Task.perform" title="Permalink to this definition">¶</a></dt>
<dd><p>Performs this Task.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><em>input_queue</em> (Queue.Queue) &#8211; the queue from which this task was created</li>
<li><em>output_queue</em> (Queue.Queue) &#8211; optional, the queue in which to place the
output of self.func</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">the output of self.func</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

</div>
<div class="section" id="module-ZDStack.ZDSThreadPool">
<h2>ZDStack.ZDSThreadPool<a class="headerlink" href="#module-ZDStack.ZDSThreadPool" title="Permalink to this headline">¶</a></h2>
<dl class="function">
<dt id="ZDStack.ZDSThreadPool.get_thread">
<tt class="descclassname">ZDStack.ZDSThreadPool.</tt><tt class="descname">get_thread</tt><big>(</big><em>target</em>, <em>name</em>, <em>keep_going</em>, <em>sleep=None</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSThreadPool.get_thread" title="Permalink to this definition">¶</a></dt>
<dd><p>Creates a thread.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><em>target</em> (function) &#8211; a function to run continuously in a while loop.</li>
<li><em>name</em> (string) &#8211; the name to give to the new thread.</li>
<li><em>keep_going</em> (function) &#8211; a function that returns a boolean; if the
boolean is false, the thread will stop running
target().</li>
<li><em>sleep</em> (int, float or Decimal) &#8211; the amount of time to sleep between loop iterations;
optional, defaults to not sleeping at all</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">threading.Thread</p>
</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">the newly created Thread</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="ZDStack.ZDSThreadPool.process_queue">
<tt class="descclassname">ZDStack.ZDSThreadPool.</tt><tt class="descname">process_queue</tt><big>(</big><em>input_queue</em>, <em>name</em>, <em>keep_going</em>, <em>output_queue=None</em>, <em>sleep=None</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSThreadPool.process_queue" title="Permalink to this definition">¶</a></dt>
<dd><p>Creates a thread that processes tasks in a Queue.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><em>input_queue</em> (Queue.Queue) &#8211; the queue from which to obtain Tasks to perform</li>
<li><em>name</em> (string) &#8211; the name to give to the new thread.</li>
<li><em>keep_going</em> (function) &#8211; a function that returns a boolean; if the
boolean is false, the thread will stop running
target().</li>
<li><em>output_queue</em> (Queue.Queue) &#8211; optional, the queue into which the output of
the performed Tasks will be placed</li>
<li><em>sleep</em> (int, float or Decimal) &#8211; the amount of time to sleep between loop iterations;
optional, defaults to not sleeping at all</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">threading.Thread</p>
</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">the newly created Thread</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

</div>
<div class="section" id="module-ZDStack.ZDSZServAccessList">
<h2>ZDStack.ZDSZServAccessList<a class="headerlink" href="#module-ZDStack.ZDSZServAccessList" title="Permalink to this headline">¶</a></h2>
<dl class="exception">
<dt id="ZDStack.ZDSZServAccessList.NoAppropriateListError">
<em class="property">exception </em><tt class="descclassname">ZDStack.ZDSZServAccessList.</tt><tt class="descname">NoAppropriateListError</tt><a class="headerlink" href="#ZDStack.ZDSZServAccessList.NoAppropriateListError" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="class">
<dt id="ZDStack.ZDSZServAccessList.ZServAccessList">
<em class="property">class </em><tt class="descclassname">ZDStack.ZDSZServAccessList.</tt><tt class="descname">ZServAccessList</tt><big>(</big><em>zserv</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSZServAccessList.ZServAccessList" title="Permalink to this definition">¶</a></dt>
<dd><p>ZServAccessList represents a ZServ&#8217;s access list.</p>
<p>If a single IP ban conflicts with a whitelisted address, an
exception is raised.  If a ban using wildcards conflicts with
one or more whitelisted addresses, the ban is sliced into pieces,
omitting the conflicting whitelisted addresses.</p>
<dl class="method">
<dt id="ZDStack.ZDSZServAccessList.ZServAccessList.add">
<tt class="descname">add</tt><big>(</big><em>*__args</em>, <em>**__kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSZServAccessList.ZServAccessList.add" title="Permalink to this definition">¶</a></dt>
<dd><p>Adds an access control.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>access_control</em> (either
<a title="ZDStack.ZDSAccessList.Ban" class="reference internal" href="#ZDStack.ZDSAccessList.Ban"><tt class="xref docutils literal"><span class="pre">Ban</span></tt></a> or
<a title="ZDStack.ZDSAccessList.WhiteListedAddress" class="reference internal" href="#ZDStack.ZDSAccessList.WhiteListedAddress"><tt class="xref docutils literal"><span class="pre">WhiteListedAddress</span></tt></a>) &#8211; a ban or whitelist to add</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSZServAccessList.ZServAccessList.remove">
<tt class="descname">remove</tt><big>(</big><em>*__args</em>, <em>**__kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSZServAccessList.ZServAccessList.remove" title="Permalink to this definition">¶</a></dt>
<dd><p>Removes an access control.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>access_control</em> (either
<a title="ZDStack.ZDSAccessList.Ban" class="reference internal" href="#ZDStack.ZDSAccessList.Ban"><tt class="xref docutils literal"><span class="pre">Ban</span></tt></a> or
<a title="ZDStack.ZDSAccessList.WhiteListedAddress" class="reference internal" href="#ZDStack.ZDSAccessList.WhiteListedAddress"><tt class="xref docutils literal"><span class="pre">WhiteListedAddress</span></tt></a>) &#8211; a ban or whitelist to add</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSZServAccessList.ZServAccessList.search_bans">
<tt class="descname">search_bans</tt><big>(</big><em>*__args</em>, <em>**__kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSZServAccessList.ZServAccessList.search_bans" title="Permalink to this definition">¶</a></dt>
<dd><p>Searches this ZServ&#8217;s ban list for the address.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>address</em> (string) &#8211; an address to test</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body">whether or not the address is banned.</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">boolean, string, or None</td>
</tr>
</tbody>
</table>
<p>Even if an address is present on the ban list, if it is also
on the white list, False is returned.  If it is not on the
white list, the reason for the ban is returned as a string.
If the address is not found at all, None is returned.</p>
</dd></dl>

</dd></dl>

</div>
<div class="section" id="module-ZDStack.ZDSZServConfig">
<h2>ZDStack.ZDSZServConfig<a class="headerlink" href="#module-ZDStack.ZDSZServConfig" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="ZDStack.ZDSZServConfig.ZServConfigParser">
<em class="property">class </em><tt class="descclassname">ZDStack.ZDSZServConfig.</tt><tt class="descname">ZServConfigParser</tt><big>(</big><em>zserv</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSZServConfig.ZServConfigParser" title="Permalink to this definition">¶</a></dt>
<dd><p>ZServConfigParser parses a config for a ZServ.</p>
<p>ZServConfigParser contains special methods for obtaining ZServ
configuration values.</p>
<dl class="method">
<dt id="ZDStack.ZDSZServConfig.ZServConfigParser.add_section">
<tt class="descname">add_section</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSZServConfig.ZServConfigParser.add_section" title="Permalink to this definition">¶</a></dt>
<dd>ZServConfigParsers don&#8217;t support adding sections.</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSZServConfig.ZServConfigParser.clear">
<tt class="descname">clear</tt><big>(</big><em>*__args</em>, <em>**__kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSZServConfig.ZServConfigParser.clear" title="Permalink to this definition">¶</a></dt>
<dd>Removes all data for this ZServ&#8217;s config.</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSZServConfig.ZServConfigParser.get">
<tt class="descname">get</tt><big>(</big><em>*__args</em>, <em>**__kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSZServConfig.ZServConfigParser.get" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets an option&#8217;s value.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><em>option</em> (string) &#8211; the name of the option whose value is to be
returned</li>
<li><em>default</em> &#8211; optional, a value to be returned if the option
if not found</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">string</p>
</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">the string value of the option if found.  If the
option is not found, but &#8216;default&#8217; is not None,
the value of the &#8216;default&#8217; argument will be returned.
Otherwise a NoOptionError is raised.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSZServConfig.ZServConfigParser.get_config_data">
<tt class="descname">get_config_data</tt><big>(</big><big>)</big><a class="headerlink" href="#ZDStack.ZDSZServConfig.ZServConfigParser.get_config_data" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets configuration data.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">string</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body">configuration data as a string in zserv configuration format</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSZServConfig.ZServConfigParser.get_raw">
<tt class="descname">get_raw</tt><big>(</big><em>*__args</em>, <em>**__kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSZServConfig.ZServConfigParser.get_raw" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets an option&#8217;s value without interpolation.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><em>section</em> (string) &#8211; the name of the section in which to look for
the option</li>
<li><em>option</em> (string) &#8211; the name of the option whose value is to be
returned</li>
<li><em>default</em> &#8211; optional, a value to be returned if the option
if not found</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">string</p>
</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">the string value of the option if found.  If the
option is not found, but &#8216;default&#8217; is not None,
the value of the &#8216;default&#8217; argument will be returned.
Otherwise a NoOptionError is raised.</p>
</td>
</tr>
</tbody>
</table>
<p>The &#8216;section&#8217; parameter is ignored, replaced by
self.zserv.name.  The signature is as it is because it&#8217;s called
by other methods that aren&#8217;t overridden here.</p>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSZServConfig.ZServConfigParser.getboolean">
<tt class="descname">getboolean</tt><big>(</big><em>*__args</em>, <em>**__kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSZServConfig.ZServConfigParser.getboolean" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets an option&#8217;s value as a boolean.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><em>option</em> (string) &#8211; the name of the option whose value is to be
returned</li>
<li><em>default</em> &#8211; optional, a value to be returned if the option
if not found</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">boolean</p>
</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">the boolean value of the option if found.  If the
option is not found, but &#8216;default&#8217; is not None,
the value of the &#8216;default&#8217; argument will be returned.
Otherwise a NoOptionError is raised.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSZServConfig.ZServConfigParser.getdecimal">
<tt class="descname">getdecimal</tt><big>(</big><em>*__args</em>, <em>**__kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSZServConfig.ZServConfigParser.getdecimal" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets an option&#8217;s value as a Decimal.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><em>option</em> (string) &#8211; the name of the option whose value is to be
returned</li>
<li><em>default</em> &#8211; optional, a value to be returned if the option
if not found</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">Decimal</p>
</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">the Decimal value of the option if found.  If the
option is not found, but &#8216;default&#8217; is not None,
the value of the &#8216;default&#8217; argument will be returned.
Otherwise a NoOptionError is raised.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSZServConfig.ZServConfigParser.getfloat">
<tt class="descname">getfloat</tt><big>(</big><em>*__args</em>, <em>**__kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSZServConfig.ZServConfigParser.getfloat" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets an option&#8217;s value as a float.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><em>option</em> (string) &#8211; the name of the option whose value is to be
returned</li>
<li><em>default</em> &#8211; optional, a value to be returned if the option
if not found</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">float</p>
</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">the float value of the option if found.  If the
option is not found, but &#8216;default&#8217; is not None,
the value of the &#8216;default&#8217; argument will be returned.
Otherwise a NoOptionError is raised.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSZServConfig.ZServConfigParser.getint">
<tt class="descname">getint</tt><big>(</big><em>*__args</em>, <em>**__kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSZServConfig.ZServConfigParser.getint" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets an option&#8217;s value as an int.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><em>option</em> (string) &#8211; the name of the option whose value is to be
returned</li>
<li><em>default</em> &#8211; optional, a value to be returned if the option
if not found</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">int</p>
</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">the int value of the option if found.  If the
option is not found, but &#8216;default&#8217; is not None,
the value of the &#8216;default&#8217; argument will be returned.
Otherwise a NoOptionError is raised.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSZServConfig.ZServConfigParser.getlist">
<tt class="descname">getlist</tt><big>(</big><em>*__args</em>, <em>**__kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSZServConfig.ZServConfigParser.getlist" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets an option&#8217;s value as a list.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><em>option</em> (string) &#8211; the name of the option whose value is to be
returned</li>
<li><em>default</em> &#8211; optional, a value to be returned if the option
if not found</li>
<li><em>parse_func</em> (function) &#8211; a function used to parse the option&#8217;s value
into a list.  optional, the default is:
&#8216;lambda x: [y.strip() for y in x.split(&#8216;,&#8217;)]&#8217;</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">list</p>
</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">the parsed list value of the option if found.  If the
option is not found, but &#8216;default&#8217; is not None,
the value of the &#8216;default&#8217; argument will be returned.
Otherwise a NoOptionError is raised.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSZServConfig.ZServConfigParser.getpath">
<tt class="descname">getpath</tt><big>(</big><em>*__args</em>, <em>**__kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSZServConfig.ZServConfigParser.getpath" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets an option&#8217;s value as a resolved path.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><em>option</em> (string) &#8211; the name of the option whose value is to be
returned</li>
<li><em>default</em> &#8211; optional, a value to be returned if the option
if not found</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">string</p>
</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">the string value of the option if found.  If the
option is not found, but &#8216;default&#8217; is not None,
the value of the &#8216;default&#8217; argument will be returned.
Otherwise a NoOptionError is raised.  The value will
be passed through
os.path.abspath(os.path.expanduser(v)).</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSZServConfig.ZServConfigParser.getpercent">
<tt class="descname">getpercent</tt><big>(</big><em>*__args</em>, <em>**__kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSZServConfig.ZServConfigParser.getpercent" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets an option&#8217;s value as a percentage.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><em>option</em> (string) &#8211; the name of the option whose value is to be
returned</li>
<li><em>default</em> &#8211; optional, a value to be returned if the option
if not found</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">string</p>
</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">the string value of the option (as a percentage) if
found.  If the option is not found, but &#8216;default&#8217; is
not None, the value of the &#8216;default&#8217; argument will be
returned.  Otherwise a NoOptionError is raised.</p>
</td>
</tr>
</tbody>
</table>
<p>The returned percentage will never be higher than 100%, use
&#8216;getdecimal()&#8217; for that.</p>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSZServConfig.ZServConfigParser.has_option">
<tt class="descname">has_option</tt><big>(</big><em>*__args</em>, <em>**__kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSZServConfig.ZServConfigParser.has_option" title="Permalink to this definition">¶</a></dt>
<dd><p>Checks if this ZServ&#8217;s config contains a specific option.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>option</em> (string) &#8211; the option to check for</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">boolean</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSZServConfig.ZServConfigParser.has_section">
<tt class="descname">has_section</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSZServConfig.ZServConfigParser.has_section" title="Permalink to this definition">¶</a></dt>
<dd>ZServConfigParsers don&#8217;t support sections.</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSZServConfig.ZServConfigParser.items">
<tt class="descname">items</tt><big>(</big><em>*__args</em>, <em>**__kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSZServConfig.ZServConfigParser.items" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets this ZServ&#8217;s config&#8217;s items.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">list of 2-Tuples</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body">a list of a section&#8217;s options and values, i.e.
[(&#8216;option&#8217;, &#8216;value1&#8217;), (&#8216;option2&#8217;, &#8216;value2&#8217;)]</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSZServConfig.ZServConfigParser.options">
<tt class="descname">options</tt><big>(</big><em>*__args</em>, <em>**__kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSZServConfig.ZServConfigParser.options" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets this ZServ&#8217;s config&#8217;s options.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">list of strings</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body">a list of strings representing the names of the
options</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSZServConfig.ZServConfigParser.process_config">
<tt class="descname">process_config</tt><big>(</big><em>reload=False</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSZServConfig.ZServConfigParser.process_config" title="Permalink to this definition">¶</a></dt>
<dd><p>Process a config.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>reload</em> (boolean) &#8211; whether or not to reload the configuration</td>
</tr>
</tbody>
</table>
<p>After the config has been successfully processed, this
ZServConfig updates its ZServ&#8217;s instance variables</p>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSZServConfig.ZServConfigParser.remove_option">
<tt class="descname">remove_option</tt><big>(</big><em>*__args</em>, <em>**__kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSZServConfig.ZServConfigParser.remove_option" title="Permalink to this definition">¶</a></dt>
<dd><p>Removes an option from this ZServ&#8217;s config.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>option</em> (string) &#8211; the option to be removed</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">boolean</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body">True if the option existed</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZDSZServConfig.ZServConfigParser.remove_section">
<tt class="descname">remove_section</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSZServConfig.ZServConfigParser.remove_section" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="ZDStack.ZDSZServConfig.ZServTRFH">
<em class="property">class </em><tt class="descclassname">ZDStack.ZDSZServConfig.</tt><tt class="descname">ZServTRFH</tt><big>(</big><em>filename</em>, <em>when='h'</em>, <em>interval=1</em>, <em>backupCount=0</em>, <em>encoding=None</em>, <em>delay=0</em>, <em>utc=0</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSZServConfig.ZServTRFH" title="Permalink to this definition">¶</a></dt>
<dd><dl class="method">
<dt id="ZDStack.ZDSZServConfig.ZServTRFH.emit">
<tt class="descname">emit</tt><big>(</big><em>record</em><big>)</big><a class="headerlink" href="#ZDStack.ZDSZServConfig.ZServTRFH.emit" title="Permalink to this definition">¶</a></dt>
<dd><p>Emit a record.</p>
<p>If a formatter is specified, it is used to format the record.
The record is then written to the stream with a trailing newline
[N.B. this may be removed depending on feedback]. If exception
information is present, it is formatted using
traceback.print_exception and appended to the stream.</p>
</dd></dl>

</dd></dl>

</div>
<div class="section" id="module-ZDStack.ZServ">
<h2>ZDStack.ZServ<a class="headerlink" href="#module-ZDStack.ZServ" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="ZDStack.ZServ.ZServ">
<em class="property">class </em><tt class="descclassname">ZDStack.ZServ.</tt><tt class="descname">ZServ</tt><big>(</big><em>name</em>, <em>zdstack</em><big>)</big><a class="headerlink" href="#ZDStack.ZServ.ZServ" title="Permalink to this definition">¶</a></dt>
<dd><p>ZServ provides an interface to a zserv process.</p>
<dl class="attribute">
<dt id="ZDStack.ZServ.ZServ.start_time">
<tt class="descname">start_time</tt><a class="headerlink" href="#ZDStack.ZServ.ZServ.start_time" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A datetime representing the time this ZServ was started - or</tt></dt>
<dt>
<tt class="descname">None if it is currently stopped.</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZServ.ZServ.restarts">
<tt class="descname">restarts</tt><a class="headerlink" href="#ZDStack.ZServ.ZServ.restarts" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A list of datetimes representing the times of the last 2</tt></dt>
<dt>
<tt class="descname">restarts (at the most).</tt></dt>
<dd></dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZServ.ZServ.name">
<tt class="descname">name</tt><a class="headerlink" href="#ZDStack.ZServ.ZServ.name" title="Permalink to this definition">¶</a></dt>
<dt>
<tt class="descname">A string representing the name of the ZServ.</tt></dt>
<dd></dd></dl>

<p>ZServ does the following:</p>
<blockquote>
<ul class="simple">
<li>Handles configuration of the zserv process</li>
<li>Provides control over the zserv process</li>
<li>Provides a method to communicate with the zserv process</li>
<li>Exports server configuration information</li>
</ul>
</blockquote>
<dl class="method">
<dt id="ZDStack.ZServ.ZServ.change_map">
<tt class="descname">change_map</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZServ.ZServ.change_map" title="Permalink to this definition">¶</a></dt>
<dd><p>Handles a map change event.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><em>map_number</em> (int) &#8211; the number of the new map</li>
<li><em>map_name</em> (string) &#8211; the name of the new map</li>
<li><em>session</em> (SQLAlchemy Session) &#8211; a database session</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZServ.ZServ.clean_up">
<tt class="descname">clean_up</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZServ.ZServ.clean_up" title="Permalink to this definition">¶</a></dt>
<dd><p>Cleans up after a round.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>session</em> (SQLAlchemy Session) &#8211; a database session</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZServ.ZServ.clear_state">
<tt class="descname">clear_state</tt><big>(</big><big>)</big><a class="headerlink" href="#ZDStack.ZServ.ZServ.clear_state" title="Permalink to this definition">¶</a></dt>
<dd>Clears the current state of the round.</dd></dl>

<dl class="method">
<dt id="ZDStack.ZServ.ZServ.ensure_loglinks_exist">
<tt class="descname">ensure_loglinks_exist</tt><big>(</big><big>)</big><a class="headerlink" href="#ZDStack.ZServ.ZServ.ensure_loglinks_exist" title="Permalink to this definition">¶</a></dt>
<dd>Creates links from all potential logfiles to the FIFO.</dd></dl>

<dl class="method">
<dt id="ZDStack.ZServ.ZServ.get_game_mode">
<tt class="descname">get_game_mode</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZServ.ZServ.get_game_mode" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets this ZServ&#8217;s current GameMode.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>session</em> (SQLAlchemy Session) &#8211; a database session</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><a title="ZDStack.ZDSModels.GameMode" class="reference internal" href="#ZDStack.ZDSModels.GameMode"><tt class="xref docutils literal"><span class="pre">GameMode</span></tt></a></td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body">the current GameMode</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZServ.ZServ.get_map">
<tt class="descname">get_map</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZServ.ZServ.get_map" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets this ZServ&#8217;s current Map.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>session</em> (SQLAlchemy Session) &#8211; a database session</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><a title="ZDStack.ZDSModels.Map" class="reference internal" href="#ZDStack.ZDSModels.Map"><tt class="xref docutils literal"><span class="pre">Map</span></tt></a></td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body">the current Map or None</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZServ.ZServ.get_round">
<tt class="descname">get_round</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZServ.ZServ.get_round" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets this ZServ&#8217;s current Round.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>session</em> (SQLAlchemy Session) &#8211; a database session</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><a title="ZDStack.ZDSModels.Round" class="reference internal" href="#ZDStack.ZDSModels.Round"><tt class="xref docutils literal"><span class="pre">Round</span></tt></a></td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body">the current Round or None</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZServ.ZServ.get_source_port">
<tt class="descname">get_source_port</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#ZDStack.ZServ.ZServ.get_source_port" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets this ZServ&#8217;s current (source) Port.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>session</em> (SQLAlchemy Session) &#8211; a database session</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><a title="ZDStack.ZDSModels.Port" class="reference internal" href="#ZDStack.ZDSModels.Port"><tt class="xref docutils literal"><span class="pre">Port</span></tt></a></td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body">the current (source) Port</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="attribute">
<dt id="ZDStack.ZServ.ZServ.has_teams">
<tt class="descname">has_teams</tt><a class="headerlink" href="#ZDStack.ZServ.ZServ.has_teams" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="ZDStack.ZServ.ZServ.is_running">
<tt class="descname">is_running</tt><big>(</big><big>)</big><a class="headerlink" href="#ZDStack.ZServ.ZServ.is_running" title="Permalink to this definition">¶</a></dt>
<dd><p>Tests whether or not the internal zserv process is running.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Returns:</th><td class="field-body">whether or not the internal zserv process is running</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">boolean</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZServ.ZServ.load_config">
<tt class="descname">load_config</tt><big>(</big><em>reload=False</em><big>)</big><a class="headerlink" href="#ZDStack.ZServ.ZServ.load_config" title="Permalink to this definition">¶</a></dt>
<dd><p>Loads this ZServ&#8217;s config.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>reload</em> (boolean) &#8211; whether or not the configuration is being
reloaded; if this is the first load, there are
some things (like creating FIFOs, etc.) we need
to do that we don&#8217;t want to do if the internal
zserv is still running</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZServ.ZServ.remove_timed_ban">
<tt class="descname">remove_timed_ban</tt><big>(</big><em>ip_address</em>, <em>timer</em><big>)</big><a class="headerlink" href="#ZDStack.ZServ.ZServ.remove_timed_ban" title="Permalink to this definition">¶</a></dt>
<dd><p>Removes a temporary ban.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><em>ip_address</em> (string) &#8211; the IP address to unban</li>
<li><em>timer</em> (threading.Timer) &#8211; the ban timer that called this method</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZServ.ZServ.restart">
<tt class="descname">restart</tt><big>(</big><em>signum=15</em><big>)</big><a class="headerlink" href="#ZDStack.ZServ.ZServ.restart" title="Permalink to this definition">¶</a></dt>
<dd><p>Restarts the zserv process, restarting it if it crashes.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>signum</em> (int) &#8211; the signal to send to the internal zserv,
SIGTERM by default</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZServ.ZServ.send_to_zserv">
<tt class="descname">send_to_zserv</tt><big>(</big><em>message</em>, <em>event_response_type=None</em><big>)</big><a class="headerlink" href="#ZDStack.ZServ.ZServ.send_to_zserv" title="Permalink to this definition">¶</a></dt>
<dd><p>Sends a message to the running zserv process.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><em>message</em> (string) &#8211; the message to send (cannot contain newlines)</li>
<li><em>event_response_type</em> (string) &#8211; the type of event to wait for in
response</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">list of <a title="ZDStack.LogEvent.LogEvent" class="reference internal" href="#ZDStack.LogEvent.LogEvent"><tt class="xref docutils literal"><span class="pre">LogEvent</span></tt></a> instances</p>
</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">a list of response events, if event_response_type is
None, the list will be empty</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZServ.ZServ.start">
<tt class="descname">start</tt><big>(</big><big>)</big><a class="headerlink" href="#ZDStack.ZServ.ZServ.start" title="Permalink to this definition">¶</a></dt>
<dd><p>Starts the zserv process.</p>
<p>This keeps a reference to the running zserv process in
self.zserv.</p>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZServ.ZServ.stop">
<tt class="descname">stop</tt><big>(</big><em>check_if_running=True</em>, <em>signum=15</em><big>)</big><a class="headerlink" href="#ZDStack.ZServ.ZServ.stop" title="Permalink to this definition">¶</a></dt>
<dd><p>Stops the zserv process.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><em>check_if_running</em> (boolean) &#8211; whether or not to check if the
internal zserv process is running</li>
<li><em>signum</em> (int) &#8211; the signal number to send to the zserv process,
15 (SIGTERM) by default</li>
</ul>
</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first">boolean or string</p>
</td>
</tr>
<tr class="field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">if an error occurred while stopping the internal
zserv, it is returned as a string - otherwise False
is returned</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZServ.ZServ.zaddban">
<tt class="descname">zaddban</tt><big>(</big><em>ip_address</em>, <em>reason='rofl'</em><big>)</big><a class="headerlink" href="#ZDStack.ZServ.ZServ.zaddban" title="Permalink to this definition">¶</a></dt>
<dd><p>Adds a ban.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><em>ip_address</em> (string) &#8211; the IP address to ban</li>
<li><em>reason</em> &#8211; the reason for the ban</li>
<li><em>type</em> &#8211; string</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZServ.ZServ.zaddbot">
<tt class="descname">zaddbot</tt><big>(</big><em>bot_name</em><big>)</big><a class="headerlink" href="#ZDStack.ZServ.ZServ.zaddbot" title="Permalink to this definition">¶</a></dt>
<dd><p>Adds a bot.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>bot_name</em> (string) &#8211; the name of the bot to add</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZServ.ZServ.zaddmap">
<tt class="descname">zaddmap</tt><big>(</big><em>map_number</em><big>)</big><a class="headerlink" href="#ZDStack.ZServ.ZServ.zaddmap" title="Permalink to this definition">¶</a></dt>
<dd><p>Adds a map to the maplist.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>map_number</em> (int) &#8211; the number of the map to add</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZServ.ZServ.zaddtimedban">
<tt class="descname">zaddtimedban</tt><big>(</big><em>duration</em>, <em>ip_address</em>, <em>reason='rofl'</em><big>)</big><a class="headerlink" href="#ZDStack.ZServ.ZServ.zaddtimedban" title="Permalink to this definition">¶</a></dt>
<dd><p>Adds a ban with an expiration.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><em>duration</em> (int) &#8211; length of ban in minutes</li>
<li><em>ip_address</em> (string) &#8211; the IP address to ban</li>
<li><em>reason</em> &#8211; the reason for the ban</li>
<li><em>type</em> &#8211; string</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZServ.ZServ.zclearmaplist">
<tt class="descname">zclearmaplist</tt><big>(</big><big>)</big><a class="headerlink" href="#ZDStack.ZServ.ZServ.zclearmaplist" title="Permalink to this definition">¶</a></dt>
<dd>Clears the maplist.</dd></dl>

<dl class="method">
<dt id="ZDStack.ZServ.ZServ.zget">
<tt class="descname">zget</tt><big>(</big><em>variable_name</em><big>)</big><a class="headerlink" href="#ZDStack.ZServ.ZServ.zget" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets a variable.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>variable_name</em> (string) &#8211; the name of the variable whose value is
to be returned</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">list of <tt class="xref docutils literal"><span class="pre">LogEvent</span></tt> instances</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZServ.ZServ.zkick">
<tt class="descname">zkick</tt><big>(</big><em>player_number</em>, <em>reason='rofl'</em><big>)</big><a class="headerlink" href="#ZDStack.ZServ.ZServ.zkick" title="Permalink to this definition">¶</a></dt>
<dd><p>Kicks a player.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><em>player_number</em> (int) &#8211; the number of the player to kick</li>
<li><em>reason</em> (string) &#8211; the reason for the kick</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZServ.ZServ.zkillban">
<tt class="descname">zkillban</tt><big>(</big><em>ip_address</em><big>)</big><a class="headerlink" href="#ZDStack.ZServ.ZServ.zkillban" title="Permalink to this definition">¶</a></dt>
<dd><p>Removes a ban.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>ip_address</em> (string) &#8211; the IP address to unban</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZServ.ZServ.zmap">
<tt class="descname">zmap</tt><big>(</big><em>map_number</em><big>)</big><a class="headerlink" href="#ZDStack.ZServ.ZServ.zmap" title="Permalink to this definition">¶</a></dt>
<dd><p>Changes the current map.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>map_number</em> (int) &#8211; the number of the map to change to</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZServ.ZServ.zmaplist">
<tt class="descname">zmaplist</tt><big>(</big><big>)</big><a class="headerlink" href="#ZDStack.ZServ.ZServ.zmaplist" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets the maplist.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">list of <tt class="xref docutils literal"><span class="pre">LogEvent</span></tt> instances</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZServ.ZServ.zplayerinfo">
<tt class="descname">zplayerinfo</tt><big>(</big><em>player_number</em><big>)</big><a class="headerlink" href="#ZDStack.ZServ.ZServ.zplayerinfo" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns information about a player.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>player_number</em> (string) &#8211; the number of the player for which to return
player information.</td>
</tr>
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">list of <tt class="xref docutils literal"><span class="pre">LogEvent</span></tt> instances</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZServ.ZServ.zplayers">
<tt class="descname">zplayers</tt><big>(</big><big>)</big><a class="headerlink" href="#ZDStack.ZServ.ZServ.zplayers" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a list of players in the server.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">list of <tt class="xref docutils literal"><span class="pre">LogEvent</span></tt> instances</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZServ.ZServ.zremovebots">
<tt class="descname">zremovebots</tt><big>(</big><big>)</big><a class="headerlink" href="#ZDStack.ZServ.ZServ.zremovebots" title="Permalink to this definition">¶</a></dt>
<dd>Removes all bots.</dd></dl>

<dl class="method">
<dt id="ZDStack.ZServ.ZServ.zresetscores">
<tt class="descname">zresetscores</tt><big>(</big><big>)</big><a class="headerlink" href="#ZDStack.ZServ.ZServ.zresetscores" title="Permalink to this definition">¶</a></dt>
<dd>Resets all scores.</dd></dl>

<dl class="method">
<dt id="ZDStack.ZServ.ZServ.zsay">
<tt class="descname">zsay</tt><big>(</big><em>message</em><big>)</big><a class="headerlink" href="#ZDStack.ZServ.ZServ.zsay" title="Permalink to this definition">¶</a></dt>
<dd><p>Sends a message as &#8216;] CONSOLE [&#8216;.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>message</em> (string) &#8211; the message to send</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZServ.ZServ.zset">
<tt class="descname">zset</tt><big>(</big><em>variable_name</em>, <em>variable_value</em><big>)</big><a class="headerlink" href="#ZDStack.ZServ.ZServ.zset" title="Permalink to this definition">¶</a></dt>
<dd><p>Sets a variable.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><em>variable_name</em> (string) &#8211; the name of the variable whose value is
to be set</li>
<li><em>variable_value</em> (string) &#8211; the new valuable</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZServ.ZServ.ztoggle">
<tt class="descname">ztoggle</tt><big>(</big><em>boolean_variable</em><big>)</big><a class="headerlink" href="#ZDStack.ZServ.ZServ.ztoggle" title="Permalink to this definition">¶</a></dt>
<dd><p>Toggles a boolean variable.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>boolean_variable</em> (string) &#8211; the name of the variable whose value
is to be toggled</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZServ.ZServ.zunset">
<tt class="descname">zunset</tt><big>(</big><em>variable_name</em><big>)</big><a class="headerlink" href="#ZDStack.ZServ.ZServ.zunset" title="Permalink to this definition">¶</a></dt>
<dd><p>Un-sets a variable.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Parameter:</th><td class="field-body"><em>variable_name</em> (string) &#8211; the name of the variable whose value is
to be un-set</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="ZDStack.ZServ.ZServ.zwads">
<tt class="descname">zwads</tt><big>(</big><big>)</big><a class="headerlink" href="#ZDStack.ZServ.ZServ.zwads" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets the currently used WADs.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Return type:</th><td class="field-body">list of <tt class="xref docutils literal"><span class="pre">LogEvent</span></tt> instances</td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
            <h3><a href="index.html">Table Of Contents</a></h3>
            <ul>
<li><a class="reference external" href="">Code</a><ul>
<li><a class="reference external" href="#module-ZDStack">ZDStack</a></li>
<li><a class="reference external" href="#module-ZDStack.LogEvent">ZDStack.LogEvent</a></li>
<li><a class="reference external" href="#module-ZDStack.Plugins">ZDStack.Plugins</a></li>
<li><a class="reference external" href="#module-ZDStack.RPCServer">ZDStack.RPCServer</a></li>
<li><a class="reference external" href="#module-ZDStack.Server">ZDStack.Server</a></li>
<li><a class="reference external" href="#module-ZDStack.Stack">ZDStack.Stack</a></li>
<li><a class="reference external" href="#module-ZDStack.Token">ZDStack.Token</a></li>
<li><a class="reference external" href="#module-ZDStack.Utils">ZDStack.Utils</a></li>
<li><a class="reference external" href="#module-ZDStack.ZDSAccessList">ZDStack.ZDSAccessList</a></li>
<li><a class="reference external" href="#module-ZDStack.ZDSConfigParser">ZDStack.ZDSConfigParser</a></li>
<li><a class="reference external" href="#module-ZDStack.ZDSDatabase">ZDStack.ZDSDatabase</a></li>
<li><a class="reference external" href="#module-ZDStack.ZDSEventHandler">ZDStack.ZDSEventHandler</a></li>
<li><a class="reference external" href="#module-ZDStack.ZDSFile">ZDStack.ZDSFile</a></li>
<li><a class="reference external" href="#module-ZDStack.ZDSModels">ZDStack.ZDSModels</a></li>
<li><a class="reference external" href="#module-ZDStack.ZDSPlayersList">ZDStack.ZDSPlayersList</a></li>
<li><a class="reference external" href="#module-ZDStack.ZDSRegexps">ZDStack.ZDSRegexps</a></li>
<li><a class="reference external" href="#module-ZDStack.ZDSTask">ZDStack.ZDSTask</a></li>
<li><a class="reference external" href="#module-ZDStack.ZDSThreadPool">ZDStack.ZDSThreadPool</a></li>
<li><a class="reference external" href="#module-ZDStack.ZDSZServAccessList">ZDStack.ZDSZServAccessList</a></li>
<li><a class="reference external" href="#module-ZDStack.ZDSZServConfig">ZDStack.ZDSZServConfig</a></li>
<li><a class="reference external" href="#module-ZDStack.ZServ">ZDStack.ZServ</a></li>
</ul>
</li>
</ul>

            <h4>Previous topic</h4>
            <p class="topless"><a href="index.html"
                                  title="previous chapter">Welcome to ZDStack&#8217;s developer documentation!</a></p>
            <h3>This Page</h3>
            <ul class="this-page-menu">
              <li><a href="_sources/code.txt"
                     rel="nofollow">Show Source</a></li>
            </ul>
          <div id="searchbox" style="display: none">
            <h3>Quick search</h3>
              <form class="search" action="search.html" method="get">
                <input type="text" name="q" size="18" />
                <input type="submit" value="Go" />
                <input type="hidden" name="check_keywords" value="yes" />
                <input type="hidden" name="area" value="default" />
              </form>
              <p class="searchtip" style="font-size: 90%">
              Enter search terms or a module, class or function name.
              </p>
          </div>
          <script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="modindex.html" title="Global Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="index.html" title="Welcome to ZDStack’s developer documentation!"
             >previous</a> |</li>
        <li><a href="index.html">ZDStack 0.11-RC1 Developer Documentation</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
      &copy; Copyright 2009, Charles Gunyon.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.3.
    </div>
  </body>
</html>